public void resizeBrowser() {
try {
System.out.println("In resize unit");
WebElement html = driver.findElement(By.tagName("html"));
html.sendKeys(Keys.chord(Keys.CONTROL,Keys.SUBTRACT));
html.sendKeys(Keys.chord(Keys.CONTROL,Keys.SUBTRACT));
System.out.println("In resize unit3");
html.click();
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_PLUS);
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.keyRelease(KeyEvent.VK_PLUS);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
It is getting marked duplicate again and again. please try to understand, what i am trying to do is a send keys operation on my FF56 webdriver instance to Zoom in and out. I dont need to set the zoom level of page by injecting JavaScript.