How To do Right click(context click) In Selenium Webdriver in Google
Here in this video you will learn selenium script for right click, selenium script for context click, how to do right click in selenium webdriver, how to do context click in selenium WebDriver.
====== selenium script =======
import java.util.concurrent.TimeUnit;
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.Actions;
public class ContextClick
{
public static void main(String[] args)
{
WebDriver driver=new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get(" http://google.com");
WebElement link = driver.findElement(By.className("_Gs"));
Actions actions=new Actions(driver);
actions.contextClick(link).perform();
actions.sendKeys("t").perform();
}
}
------------------------------------------------------------------------------------------------------------
Please subscribe us:
https://www.youtube.com/c/EasyTutoria...
Like us on Facebook:
https://www.facebook.com/EasyTutorial...
Here in this video you will learn selenium script for right click, selenium script for context click, how to do right click in selenium webdriver, how to do context click in selenium WebDriver.
====== selenium script =======
import java.util.concurrent.TimeUnit;
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.Actions;
public class ContextClick
{
public static void main(String[] args)
{
WebDriver driver=new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get(" http://google.com");
WebElement link = driver.findElement(By.className("_Gs"));
Actions actions=new Actions(driver);
actions.contextClick(link).perform();
actions.sendKeys("t").perform();
}
}
------------------------------------------------------------------------------------------------------------
Please subscribe us:
https://www.youtube.com/c/EasyTutoria...
Like us on Facebook:
https://www.facebook.com/EasyTutorial...
Selenium Webdriver tutorial | How To do Right click | Context Click | |
5 Likes | 5 Dislikes |
3,861 views views | 57,381 followers |
Education | Upload TimePublished on 24 Apr 2015 |
No comments:
Post a Comment