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,290 points
744 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,070 points

Related Questions In Selenium

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,610 points
5,094 views
0 votes
2 answers

How to get HTML Source of WebElement in Selenium WebDriver using Python?

You can read innerHTML attribute to get source of ...READ MORE

answered Jun 13, 2018 in Selenium by Samarpit
• 5,130 points
12,597 views
0 votes
3 answers
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,070 points
443 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,130 points
791 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,130 points
433 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,070 points
814 views
0 votes
1 answer