SELENIUM BASICS:


SELENIUM WEBDRIVER:


TESTNG:


REPORTS:


BUILD & CONTINUOUS INTEGRATION TOOLS:


CROSS BROWSER TESTING:


MOBILE TESTING:


AUTOMATION FRAMEWORKS:


API Testing:


INTERVIEW QUESTIONS:


SAMPLE RESUME:

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:

Sharing is caring.

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Like This Post?

We have a lot more where that came from?

We only send really good stuff occasionally, promise.

Rajkumar SM

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

      1. Hi Raj,

        Would like to share an observation for Method 2 code. I tried using SendKeys() method, but no change is seen on the screen. i have also put thread.sleep() to see the changes but nothing is seen.

        1. I agree with you Saili Inamdar. Good observation. Sometimes in some applications it wont work. We could use any of the two methods.

Leave a Comment

Your email address will not be published. Required fields are marked *

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on whatsapp

Recent Posts:

Scroll to Top
API Testing eBook

DOWNLOAD FOR FREE