Is there a way to set browser zoom when executing? When I am on my laptop the elements cover themselves and are not clickable. If I zoom out to 80% it can see them. I’d rather not send keys with ctrl - as this is only needed on my laptop and I like to avoid send keys.
Is there a way to choose default zoom when executing in chrome? If I set my browser to 80% katalon always runs it at 100% anyway.
It tells me the object is not clickable. It’s the coding in the background, visually you can see the elements separate. On a code level they are overlapping and one is actually behind the other.
It tells me the object is not clickable. It’s the coding in the background, visually you can see the elements separate. On a code level they are overlapping and one is actually behind the other
Here is code snippet I use for Chrome. This will default your zoom at startup based on the chrome settings, so no css.
//extra imports
import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.Keys as Keys
import org.openqa.selenium.JavascriptExecutor
WebUI.executeJavaScript(“document.body.style.zoom=‘XY%’”, null) did not work for me, not sure why, it gave me token not recognized error, replacing XY by 60 say.
Robot robot = new Robot()
for (int i = 0; i < 4; i++) { // how many times you want CRTL+'-' pressed
robot.keyPress(KeyEvent.VK_CONTROL)
robot.keyPress(KeyEvent.VK_SUBTRACT)
robot.keyRelease(KeyEvent.VK_SUBTRACT)
robot.keyRelease(KeyEvent.VK_CONTROL)
}