-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathActions2.java
24 lines (21 loc) · 929 Bytes
/
Actions2.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package VINDVG1.Vinay27;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import io.github.bonigarcia.wdm.WebDriverManager;
public class Actions2 {
public static void main(String[] args) {
WebDriverManager.chromedriver().setup();
WebDriver driver = new ChromeDriver();
driver.get("https://demo.guru99.com/test/simple_context_menu.html");
driver.manage().window().maximize();
Actions Sudha = new Actions(driver);
//WebElement rightclick = driver.findElement(By.xpath("//*[@id=\"authentication\"]/span"));
//Sudha.contextClick(rightclick).perform();
WebElement doubleclick = driver.findElement(By.xpath("//*[@id=\"authentication\"]/button"));
Sudha.doubleClick(doubleclick).perform();
System.out.println("Script sucess");
}
}