Double
Click in Selenium
We can double click an
element or an webpage using Actions class in
selenium, doubleClick() method in Actions class helps us to do a
double click on the elements.
Consider you want to perform Double Click action on
any web element i.e. as per given in below screenshot.
After Double Click on the Above Web Element below pop up will give
you confirmation about double click action.
Script:
package pack2;
import
org.openqa.selenium.By;
import
org.openqa.selenium.WebDriver;
import
org.openqa.selenium.WebElement;
import
org.openqa.selenium.firefox.FirefoxDriver;
import
org.openqa.selenium.interactions.Action;
import
org.openqa.selenium.interactions.Actions;
public class DoubleClick
{
public static void
main(String[] args) {
WebDriver driver = new
FirefoxDriver();
driver.manage().window().maximize();
driver.get("http://www.testingbar.com/doubleclick/");
WebElement dElement = driver.findElement(By.xpath("//*[@id='post-746']/div/p[1]/button"));
Actions a = new Actions(driver);
a.doubleClick(dElement).perform();
driver.close();
}
}
Excellent Post!! I gathered lots of information here. Do share more updates.
ReplyDeleteselenium training in velachery
selenium training in tambaram
java training in tambaram
SEO Training in Anna Nagar
Software Testing Training in T Nagar
Python training in chennai
Android Training in OMR
Software testing training in Anna Nagar
RPA Training in Anna nagar
Web Designing Course in T Nagar
ReplyDeleteGreat Post with valuable information.I am glad that I have visited this site.Share more updates.
selenium training in OMR
selenium training in anna nagar
Java Training in OMR
Java course in Tambaram
DevOps Training in Anna Nagar
Digital Marketing Course in Anna Nagar
Software Testing Training in T Nagar
Graphic design courses in Porur
Web Designing Course in T Nagar
PHP Training in Chennai
All the things in the blog are conveyed so elegantly.
ReplyDeleteAutomation testing
Flawless and legendary blog, Full of sublime and virtuosic words.
ReplyDeletealpinestars boots
Thanks for providing recent updates regarding the concern, I look forward to read more. Penetration Testing
ReplyDeleteNice to be visiting your blog once more, it has been months for me. convert pdf to png
ReplyDelete