0

How do I change the zoom in the chrome window using the selenium web driver in C #?

This not working:

IJavaScriptExecutor executor = (IJavaScriptExecutor)driver;
        executor.ExecuteScript("document.body.style.zoom = '60%'");
BDL
  • 21,052
  • 22
  • 49
  • 55
  • I don't know why that solution is not working for you as the same script works for me -- I tried at 10% to see the actual difference. Do note that this solution forcibly renders the page to the scale provided and is not using the browser zoom. If you're open for another approach, you might want to check this: https://stackoverflow.com/questions/15024756/selenium-webdriver-zoom-in-out-page-content – iamkenos Jun 05 '18 at 08:34
  • nothing works ;/ – Duck Daffy Jun 05 '18 at 08:59

0 Answers0