How To Zoom In And Zoom Out Browser In Selenium WebDriver | Software Testing Material

How To Zoom In And Zoom Out In Selenium

We all know Selenium automates browsers. When we are running selenium scripts, sometimes we may face a situation where we need to perform zoom in and zoom out. In Selenium, this can be easily achieved. In this article, I will show you two methods on how to Zoom In and Zoom Out in Selenium WebDriver.

Manually, we have to press CTRL+ADD to do Zoom In and we have to press CTRL+SUBTRACT to do zoom out. I have tested both the below methods i.e., how to zoom in and zoom out on firefox.

How To Handle Zoom In And Zoom Out

Method 1: Using Robot Class

We can perform page zoom action using sendKeys method.

Method 2: Using SendKeys Method

Must Read: Selenium Complete Tutorial

Read More:

Rajkumar SM is a founder of SoftwareTestingMaterial. He is a certified Software Test Engineer by profession and blogger & youtuber by choice. He has an extensive experience in the field of Software Testing. He writes here about Software Testing which includes both Manual and Automation Testing. He loves to be with his wife and cute little kid 'Freedom'.

6 thoughts on “How To Zoom In And Zoom Out Browser In Selenium WebDriver | Software Testing Material”

Leave a Comment

Share via
Copy link
Powered by Social Snap