python selenium chrome webdriver options
페이지 정보
작성자 관리자 (112.♡.173.204) 작성일 21-04-28 22:51 조회 3,212 댓글 0본문
```
options = webdriver.ChromeOptions()
# disable logging
options.add_experimental_option("excludeSwitches",["enable-logging","enable-automation"])
# disable 'save password' popup
options.add_experimental_option("prefs", {
"credentials_enable_service": False,
"profile": {
"password_manager_enabled": False
}
})
# disable 'save password' popup another
# options.add_experimental_option("prefs", {"credentials_enable_service": False,"profile.password_manager_enabled": False})
# options.headless = True
# options.add_argument("window-size=1366x768")
# options.add_argument("user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36")
driver = webdriver.Chrome(options=options)
```
options = webdriver.ChromeOptions()
# disable logging
options.add_experimental_option("excludeSwitches",["enable-logging","enable-automation"])
# disable 'save password' popup
options.add_experimental_option("prefs", {
"credentials_enable_service": False,
"profile": {
"password_manager_enabled": False
}
})
# disable 'save password' popup another
# options.add_experimental_option("prefs", {"credentials_enable_service": False,"profile.password_manager_enabled": False})
# options.headless = True
# options.add_argument("window-size=1366x768")
# options.add_argument("user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36")
driver = webdriver.Chrome(options=options)
```
추천0
댓글목록 0
등록된 댓글이 없습니다.