I am trying to zoom out to 25% in my python selenium program,
As you can see the elements that should appear when scrolling down in the first image are all visible in the second image when zoomed out to 25%.
I tried driver.execute_script("document.body.style.zoom='25%'")
but that's how it zoomed out:
For some reason these solutions didn't do anything for me:
1-
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
actions = ActionChains(driver)
actions.key_down(Keys.CONTROL).send_keys(Keys.SUBTRACT).key_up(Keys.CONTROL).perform()
2-
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
zoomOut = ActionChains(driver)
zoomOut.key_down(Keys.CONTROL)
for i in range(7):
print(i)
zoomOut.send_keys("-")
zoomOut.key_up(Keys.CONTROL)
zoomOut.perform()
3- The solution driver.execute_script("$('id_body').css('zoom', 25);")
in this question doesn't do anything in my program.