Created
February 3, 2023 07:44
-
-
Save zac11/840a2a614e8b6ba045eaaf829935a434 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from selenium import webdriver | |
from webdriver_manager.chrome import ChromeDriverManager | |
from selenium.webdriver.chrome.service import Service | |
svc=Service(ChromeDriverManager().install()) | |
driver = webdriver.Chrome(service=svc) | |
max_width, max_height = driver.execute_script("return [window.screen.availWidth, window.screen.availHeight];") | |
print(max_width,max_height) | |
time.sleep(3) | |
driver.set_window_size(max_width,max_height) | |
driver.get("https://selectorshub.com/xpath-practice-page/") | |
driver.implicitly_wait(20) | |
driver.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment