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,480 points
1,862 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,520 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,580 points
3,584 views
+1 vote
2 answers

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

WebDriver driver; JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("document.getElementById('id123').setAttribute('attr', ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,010 points
18,000 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,520 points
4,619 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,010 points
5,469 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,890 points
3,298 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 2, 2020 in Selenium by Sri
• 3,010 points
3,898 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,520 points
2,333 views
0 votes
1 answer