How can we set zoom level in selenium/protractor zoom page size to 90 percent etc
Dont know whether an equivalent is there in protractor (since never worked), but this is how I would zoom-in and out in java webdriver via JavascriptExecutor using:
document.body.style.transform='scale(0.9)'
where 0.9 is scale percentage. Though for zoom u can also use
document.body.style.zoom='90%'
but this won't work on firefox and opera. Hope this could be helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With