How do I set the zoom level of Internet Explorer to 100 when using python winreg

0 votes

I'm trying to do UI testing and trying to set IE zoom percentage as 100% during run time.

This is what I have tried till now

from _winreg import *
"""POC to fix Zoom value to 100 percent"""
keyVal = r'Software\Microsoft\Internet Explorer\Zoom'
key = OpenKey(HKEY_CURRENT_USER, keyVal, 0, KEY_ALL_ACCESS)
SetValueEx(key, "100000", 0, REG_DWORD, 0)
Mar 30, 2018 in Selenium by Shubham
• 13,490 points
3,348 views

1 answer to this question.

0 votes

My qustion is, by default for testing with IE, the zoom level will be 100%. How is it not for you?

But anyway, getting back to your problem, you can simulate the actions by  pressing Ctrl+0. This will set browser zoom level to 100%

body = driver.find_element_by_xpath("//body")
body.send_keys("u'\ue009'"+"u'\ue01a'")
answered Mar 30, 2018 by nsv999
• 5,500 points

Related Questions In Selenium

0 votes
0 answers
+1 vote
1 answer

How can I automate the process of adding iPhone to cart in Flipkart using Selenium(java),Page Object Model and TestNG? Also validate if product is added and available in cart?

Hey check this https://www.edureka.co/community/47160/automate-purchase-adding-book-cart-flipkart-using-selenium? It deals with a similar ...READ MORE

answered Jan 13, 2020 in Selenium by Karan
• 19,610 points
8,394 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,763 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,184 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,258 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,895 views
0 votes
1 answer

I tried to open a new website when a new tab is opened using Selenium Webdriver

Try this code: ArrayList<String> tabs = new ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,500 points
4,457 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP