import org.testng.annotations.Test;
import org.testng.annotations.BeforeTest;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
import org.testng.annotations.AfterTest;
public class RightClick {
public class Rightclick {
public WebDriver driver;
@Test //Right Click on Link,Button and Image etc.. using Selenium Webdriver
public void RightClick() throws Exception {
driver.get("http://seleniumsubbu.blogspot.in/");
Thread.sleep(5000);
Actions act=new Actions(driver);
act.contextClick(driver.findElement(By.linkText("Git"))).perform();
}
@BeforeTest
public void beforeTest() {
driver = new FirefoxDriver();
driver.manage().window().maximize();
}
public class Rightclick {
public WebDriver driver;
@Test //Right Click on Link,Button and Image etc.. using Selenium Webdriver
public void RightClick() throws Exception {
driver.get("http://seleniumsubbu.blogspot.in/");
Thread.sleep(5000);
Actions act=new Actions(driver);
act.contextClick(driver.findElement(By.linkText("Git"))).perform();
}
@BeforeTest
public void beforeTest() {
driver = new FirefoxDriver();
driver.manage().window().maximize();
}
@AfterTest
public void afterTest() {
}
}
}
public void afterTest() {
}
}
}