click

C# how to click an IWebelement in a IList?

≡放荡痞女 提交于 2020-01-24 13:35:08
问题 So I tried to click a button on YouTube, but I can't find the button by the Xpath because there are so many buttons, so I tried saving them in an IList, now I want to click a specific button in the list. ChromeDriver chrome = new ChromeDriver(); List<IWebElement> textfields = new List<IWebElement>(); chrome.Navigate().GoToUrl("https://www.youtube.com/watch?v=9bZkp7q19f0"); textfields = chrome.FindElements(By.XPath("//*[@id=\"button"]")).ToList(); 回答1: As per the documentation of Selenium

gwt click event document

心不动则不痛 提交于 2020-01-24 10:41:25
问题 i need to register a cross platform and version independent click event to the document. that means i have a two text box and submit button but when i click outside of the two text box and submit button then alert will be displayed .how can i achive this by gwt document.get().addMouseClick ??? 回答1: The easiest way that comes to mind is to wrap everything in a FocusPanel: ClickHandler clickHandler = new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.alert("TextBox

Close fancybox with outside click when overlay is set to null

↘锁芯ラ 提交于 2020-01-24 09:18:05
问题 I am using the fancybox 2.1.4 plugin. It works perfectly, but I have an issue. I want to set the overlay to null and I want to close the fancybox when the user clicks outside(!) the fancybox container. I have tried the following code, but it isn't working, since there's no overlay to click on. $(".fancy_gallery").fancybox.({ loop:false, padding:0, helpers:{ overlay:null, closeClick:true } }); So, how can I force fancybox to close, when I click outside of it? Because, right now I must click on

Pass click event through the view android

前提是你 提交于 2020-01-24 04:55:11
问题 I have frame layout: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="10dp" > <LinearLayout android:id="@+id/widgetView" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center" android:layout_margin="10dp" android:gravity="center" > </LinearLayout> <LinearLayout android:id="@+id/widgetOverlayFrame" android:layout_width="match

.click() on <input type=“file” /> does not work in Firefox 3.6 - Any workarounds?

独自空忆成欢 提交于 2020-01-23 13:30:11
问题 Here is a little example: (live demo here) HTML: <input id="file" type="file" /> Javascript: $(function() { $("#file").click(); }); In Firefox 3.6.6 nothing happens, while in IE7 the "Choose File" dialog box is opened. Any ideas how to open the "Choose File" dialog box in Firefox without clicking on the Browse button ? 回答1: The file-dialog breaks out of the sandbox your javascript code runs in (access to HDD). Good/secure browsers (= not IE7) should prevent that this dialog is opened via a

Timed out after 30000ms when I tried to go next page by clicking Submit button using Selenium RC

我是研究僧i 提交于 2020-01-21 14:56:26
问题 I am using Selenium RC by java. Fill up necessary data on 1st page--> Click Submit button to go next page. My code is: selenium.click("Submit"); selenium.waitForPageToLoad("30000"); After clicking Submit button I found the error: com.thoughtworks.selenium.SeleniumException: Timed out after 30000ms Can anybody pls help me? 回答1: Selenium.waitforpagetoload("30000"); means you are giving time 30000 m.s= 30 seconds It means your page is taking more than 30 seconds to load completely. So in order

How to disable double clicks or timeout clicks with jQuery?

↘锁芯ラ 提交于 2020-01-21 10:10:06
问题 I have an anchor which is using jQuery .click event to start a few functions. jQuery(document).ready(function(){ jQuery('a.slide_circ').click(function(){ do_all_functions(); return false; }); }); This is the code in short.. Its working as it needs to, every click on anchor class slide_circ start do_all_functions. But I have a problem there. If user make double clicks they run 2 times or more the functions... And the how idea go to hell. I think that I need to disable the double click some way

How do I close a form when a user clicks outside the form's window?

本秂侑毒 提交于 2020-01-21 07:03:33
问题 I want to close a System.Windows.Forms.Form if the user clicks anywhere outside it. I've tried using IMessageFilter, but even then none of the messages are passed to PreFilterMessage. How do I receive clicks outside a form's window? 回答1: In your form's Deactivate event, put "this.Close()". Your form will close as soon as you click anywhere else in Windows. Update: I think what you have right now is a Volume button, and inside the Click event you create an instance of your VolumeSlider form

How to click on selectbox options using PhantomJS

☆樱花仙子☆ 提交于 2020-01-21 05:04:25
问题 There is the page testkrok.org.ua with a consistent selection of parameters. So, I need to create a series of 5 clicks on each of the options of 5 select boxes that depend on each other. document.querySelector('select.se1')[3] document.querySelector('select.se2')[1] document.querySelector('select.se3')[1] document.querySelector('select.se4')[1] document.querySelector('select.se5')[3] to redirect to the page with tests. But on snapshot taken after the first click the second panel does not

How do you simulate typing using jQuery?

落花浮王杯 提交于 2020-01-21 04:35:39
问题 Like how the click() can be used to trigger a click event on an element, is there any way to simulate the typing of a string? 回答1: Are you looking for a way to trigger the events associated with typing or do you want to append text to a container so that it looks like someone is typing? If you're looking for the events, then @Nick is absolutely correct in suggesting the methods for triggering the event. If the latter, you'll want to use a timer to replace the text/html of the container with