java - Simulating Zoom in Chrome with Selenium -
i'm trying test involves browser zooming in selenium (java). following approach:
webelement html = m_webdriver.findelement(by.tagname("html")); html.sendkeys(keys.chord(keys.control, keys.add));
this worked fine in ie, causes exception in chrome saying "cannot focus element", happens whenever attempt send keys in chrome.
the following sources have had similar issues, no workaround listed works me:
https://code.google.com/p/selenium/issues/detail?id=2328&noredir=1
thanks!
i'm not 100% sure, best use javascript that.
something along lines of:
driver.executescript("document.body.style.zoom=1.0"); // or 0.9 or whatever
Comments
Post a Comment