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


  1. Thanks for sharing valuable information and it is useful for onlineitguru provides the best selenium Online Training Hyderabad

  2. Yiioverflow presenting one of the best and high performance PHP framework. Fast, secure and extremely professionals are developing applications. We guide to implement mobile app development and SOA hybrid applications.Code in Nodejs, Angular,Ionic,ReactJS and Yiiframework.


Java Program 6: How to reverse a String in Java?

In this post we will discuss different methods to reverse a String in java programming. Method 1: Step 1: Read the input string using ...