Created
May 27, 2017 03:10
-
-
Save kurozumi/e050bd40177d0f74d1a70e01af3eac66 to your computer and use it in GitHub Desktop.
【Python】Seleniumでウィンドウサイズを取得する方法
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
from selenium.webdriver import Firefox | |
try: | |
driver = Firefox() | |
driver.get("https://a-zumi.net") | |
# 表示されたウィンドウの高さと幅、ウィンドウのx、y座標を取得します。 | |
print(driver.get_window_rect()) | |
except Exception as e: | |
print(e) | |
finally: | |
driver.quit() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment