how to set edge zoom to 100 percent ?
pvbemmelen62 opened this issue · 2 comments
I have a script that runs via gitlab CI/CD on a linux agent. The script opens a browser and wants to click on some button, but the button isn't visible: the edge browser window has zoom 120 % , and the button only shows at zoom less than 110 % .
My guess is that some other program earlier set the zoom on the linux agent to 120 % .
Is there a way to set the zoom of the edge browser to 100 % ?
I tried
|press|control+0|
as described on page
https://sigmaos.com/tips/browsers/how-to-zoom-in-on-microsoft-edge
but that has no effect. Neither has
|press|control++|
How do I set zoom to 100 % ?
According to https://stackoverflow.com/questions/15024756/selenium-webdriver-zoom-in-out-page-content#answer-15025302 you should be able to do this by having Selenium send Ctrl+0
(like you could do if you were on the machine).
In a BrowserTest script I believe this is also possible by doing:
| press | Control + 0 |
I wrote a script that took a screenshot (1) of the webapplication under test.
And then did 3 times
|press |Control + + |
|wait seconds|1 |
and then took another screenshot (2). Followed by
| press | Control + 0 |
and another screenshot (3).
All screenshots show the same zoom.
The Control + +
does seem to have some effect: the page is scrolled down to the bottom.
I also tried variations such as Control++
, i.e. without spaces, but the zoom isn't changed.