I am using Selenium and for the application for which I am writing code has some issues. To find Login object I have to zoom in to 30% approx. and I want to control this using c# code. So, can anybody help me with this?
Asked
Active
Viewed 1,244 times
0
-
Thats a strange behaviour, zooming for finding element. Anyhow u can also give a try to [this](http://stackoverflow.com/questions/29092434/how-can-we-set-zoom-level-in-selenium-protractor-i-e-zoom-to-90/29092880#29092880). May this could be helpful on zoom part. – Vivek Singh Jul 27 '15 at 20:55
1 Answers
0
You should send hotkeys (CTRL+Plus) for zooming it:
WebElement myRootElement = driver.findElement(By.tagName("html"));
new Actions(driver)
.sendKeys(myRootElement, Keys.CONTROL, Keys.ADD, Keys.NULL)
.perform();

Stan E
- 3,396
- 20
- 31