This blog is for Automation Test Engineers

Sunday, 27 August 2017

How to Zoom in and Zoom out

WebDriver driver=new FirefoxDriver();
driver.get("https://www.google.co.in/");
WebElement searchtextbox=driver.findElement(By.name("q")):
//zoom in
searchtextbox.sendkeys(Keys.chord(Keys.Control,Keys.ADD));

//zoom out
searchtextbox.sendkeys(Keys.chord(Keys.Control,Keys.SUB));




0

0 comments:

Post a Comment