Note that there are some explanatory texts on larger screens.

plurals
  1. POMouse doubleclick not work in textbox using Selenium WebDriver
    primarykey
    data
    text
    <p>I try to double click on the text box by which the text will be selected.....The code looks like </p> <pre><code> WebDriver driver=new FirefoxDriver(); driver.manage().window().maximize(); driver.get("https://www.facebook.com/"); WebElement txtBoxElement=driver.findElement(By.xpath("//*[@id='email']")); txtBoxElement.sendKeys("abc"); System.out.println("Test start"); Actions builder=new Actions(driver); Action a=builder.moveToElement(txtBoxElement).doubleClick(txtBoxElement).build(); a.perform(); //This is for another way to double click on the text field Locatable locatable = (Locatable) driver.findElement(By.name("email")); Mouse mouse = ((HasInputDevices) driver).getMouse(); mouse.mouseMove(locatable.getCoordinates()); mouse.doubleClick(locatable.getCoordinates()); System.out.println("Test Complete"); } </code></pre> <p>but both of this way was not working I bypass this problem using this</p> <pre><code> Action a=builder.moveToElement(txtBoxElement).sendKeys(txtBoxElement,Keys.chord(Keys.CONTROL,"a")).build(); a.perform(); </code></pre> <p><strong>my question is why double click is not working?</strong> I also try this for google search textbox it was also not working. Here I want to mention one thing that I use Selenium 2.37 and firefox 26 .</p> <p>I did not get any error but not double click on this element.I also observe that if I commented out the <strong>txtBoxElement.sendKeys("abc");</strong> part and then sendkeys using Actions event,it write the text on browser address bar.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload