본문으로 바로가기

[Selenium] Web 해상도 조절

category selenium 2020. 1. 11. 11:31
728x90

1. 원하는 해상도로 변경

driver = webdriver.Chrome()

driver.implicitly_wait(3)
#원하는 해상도 입력
driver.set_window_size(1920, 1080)

driver.get("http://www.naver.com")

2. Full Screen 변경

from selenium.webdriver.chrome.options import Options

#Option 함수로 FullScreen으로 변경
options = Options()
options.add_argument('--start-fullscreen')
driver = webdriver.Chrome(options=options)

driver.implicitly_wait(3)
driver.get("http://www.naver.com")

'selenium' 카테고리의 다른 글

[Selenium] Try/Except를 이용한 예외처리  (0) 2020.01.12
[Selenium] 활성 Tab 변경  (0) 2020.01.11
[Selenium] 현재 화면 Capture  (0) 2020.01.08
[Selenium] Web Console Log 출력  (0) 2020.01.07
[Selenium] Selenium installation  (0) 2019.07.28