Display results as :

Rechercher Advanced Search

Latest topics
» Regarding Alert Interface
Fri Feb 24, 2017 2:00 pm by karthikeyakumar

» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c


Double Click on image using Selenium

View previous topic View next topic Go down

Double Click on image using Selenium

Post by vrangaiah on Thu Sep 08, 2011 8:37 pm

I have test case where I have to double click on the image to check the test case.

Xpath from Xpath Checker :-


Xpath from Inspect Element (Copy Xpath) :-


HTML Tag :-
class="cwks-EnableHand" style="width: 48px; height:

DoubleClick API do not work, since it works only for Button or link. In my application its image.

Please suggest if have faced same problem or if have solution


Posts : 1
Join date : 2011-08-31

Back to top Go down

Re: Double Click on image using Selenium

Post by iAssets on Thu Aug 23, 2012 9:44 pm

In Selenium WebDriver (Java - 2.25.0 - 2012-07-18), the following code doesn't build:

WebDriver driver = new FirefoxDriver();
WebElement element = driver.findElement(By.xpath("yourpath"));
Actions builder = new Actions(driver);
Action doubleClick = builder.doubleClick(element).build().perform();

Eclipse says: "Type mismatch: cannot convert from void to ExecProtos.ActionList.Action".

However, the following works in Selenium WebDriver:

String baseUrl = "your url";   
String my_xpath = "yourpath";     
Selenium s = new WebDriverBackedSelenium(driver, baseUrl); 
s.doubleClick(("xpath=" + my_xpath));

Does anybody know if it (doubleclick) works in Selenium IDE? I tried in Selenium 1.9.0 (firefox), but the Command, "doubleClick" is doing NOTHING.


Posts : 2
Join date : 2012-08-22

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum