Saturday, January 20, 2018

How to Zoom In and Zoom Out browser in Selenium?

With the help of Robot class we can Zoom In or Zoom Out the browsers in Selenium Automation. We need to press CNTRL+ADD (symbol '+') to Zoom In and CTNRL+SUBTRACT (symbol '-') to Zoom Out.

First, I tried with SendKeys() method as shown in the below screenshot for both Firefox and Chrome browsers but it didn't work. Don't know the reason but I suspect that the issue is with latest Selenium WebDriver version.


Check out the below code, where we are using Robot class to Zoom In and Zoom Out. I think the code is self explanatory for you.
Please comment your suggestions and queries on this post. Thanks for reading!!

#seleniumbabu #HappyLearning

3 comments:

  1. thanks for sharing and supreet is the best institute for selenium supreetsolutions

    ReplyDelete
  2. Interesting blog I must say, the facts and information written here are accurate. black leather motorcycle jacket com.android.browser.home

    ReplyDelete

DevOps 01: What is DevOps and How it benefits organizations?

DevOps is a culture in an organization, where the development team and operations team help each other by sharing information, process and t...