0

Firefox Version: 52.0.2 (32 bit)
Platform: Windows 7 - 64 bit
Selenium Webdriver Version: 3.4.0 (Java bindings)
GeckoDriver: 0.16.0
Problem Statement:
Selenium 3.x is unable to perform double click operation. Test Code:

public class GeckoTest {
    public static void main(String[] args) throws IOException {
        System.setProperty("webdriver.gecko.driver","I:\\jetbrainsworkspace\\src\\test\\resources\\geckodriver.exe");
        FirefoxBinary binary = new FirefoxBinary(new File("D:\\installations\\browsers\\ff\\52.0.2_32\\firefox.exe"));
        FirefoxOptions options = new FirefoxOptions();
        options.setBinary(binary);
        options.setLogLevel(Level.ALL);
        WebDriver browser = new FirefoxDriver(options);
        browser.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS);
        browser.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
        browser.get("https://examples.sencha.com/extjs/6.0.1/examples/classic/ticket-app/index.html");
        WebDriverWait wait = new WebDriverWait(browser,20,3000);
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("password"))).sendKeys("sometext");
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(".//span[text()='Login']"))).click();
        WebElement ele = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(".//div[text()='Fiant adipiscing clari nunc molestie per placerat vero insitam; ullamcorper saepius etiam claritatem quod.']")));
        Actions builder = new Actions(browser);
        builder.doubleClick(ele).build().perform();
        browser.close();
    }
}

EDIT: Manual Steps

  1. Navigate to EXTJs link
  2. Login with any password.
  3. On the right hand side you will find a table of tickets.
  4. If you double click on any one ticket that then it will open that ticket.
Mrunal Gosar
  • 4,595
  • 13
  • 48
  • 71
  • Can you consider updating us with your manual testing​ steps please? – undetected Selenium Jun 04 '17 at 17:24
  • Does your element supports double click? Or are you trying to click to select/highlight the text? – Murthi Jun 04 '17 at 17:53
  • It seems this is an known issue and needs further investigation by the selenium contributors group: https://github.com/mozilla/geckodriver/issues/661 – Mrunal Gosar Jun 05 '17 at 17:47
  • Possible duplicate of [Perform DoubleClick on element that have that](https://stackoverflow.com/questions/35004164/perform-doubleclick-on-element-that-have-that) – dank8 Sep 04 '17 at 23:57

1 Answers1

2

To overcome problems with doubleclicking in Selenium try Alternative workaround Source

simplified to this:

((JavascriptExecutor) driver).executeScript("document.getElementById('map_container').dispatchEvent(new Event('dblclick'));"); 
dank8
  • 361
  • 4
  • 20