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,380 points
1,190 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,510 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 in Selenium by Karan
• 9,500 points
1,680 views
0 votes
1 answer

Is it possible to manually set the attribute value of a Web Element using Selenium?

Yes, its very much possible. You just ...READ MORE

answered May 8, 2018 in Selenium by king_kenny
• 3,710 points
10,725 views
0 votes
1 answer

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,510 points
2,218 views
0 votes
1 answer
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,870 points
1,828 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,870 points
1,822 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,510 points
1,490 views
0 votes
1 answer