Sunday, 22 September 2013

Zoom in & Zoom out [Windows | MAC]

Zoom in
WebElement html = driver.findElement(By.tagName("html"));
html.sendKeys(Keys.chord(Keys.CONTROL, Keys.ADD));

Zoom out
WebElement html = driver.findElement(By.tagName("html"));
html.sendKeys(Keys.chord(Keys.CONTROL, Keys.SUBTRACT));

Zoom 100%
WebElement html = driver.findElement(By.tagName("html"));
html.sendKeys(Keys.chord(Keys.CONTROL, "0"));

Zoom Feature on MAC
WebElement html = driver.findElement(By.tagName("html"));
html.sendKeys(Keys.chord(Keys.COMMAND, Keys.ADD));
html.sendKeys(Keys.chord(Keys.COMMAND, Keys.SUBTRACT));
html.sendKeys(Keys.chord(Keys.COMMAND, Keys."0"));

3 comments:

  1. Seleniumworks: Zoom In And Zoom Out [Windows >>>>> Download Now

    >>>>> Download Full

    Seleniumworks: Zoom In And Zoom Out [Windows >>>>> Download LINK

    >>>>> Download Now

    Seleniumworks: Zoom In And Zoom Out [Windows >>>>> Download Full

    >>>>> Download LINK lC

    ReplyDelete
  2. Seleniumworks: Zoom In And Zoom Out [Windows >>>>> Download Now

    >>>>> Download Full

    Seleniumworks: Zoom In And Zoom Out [Windows >>>>> Download LINK

    >>>>> Download Now

    Seleniumworks: Zoom In And Zoom Out [Windows >>>>> Download Full

    >>>>> Download LINK 9D

    ReplyDelete