![](/img/trans.png)
[英]Selenium Chrome can't see browser logs InvalidArgumentException
[英]Can't see result of opening Chrome browser with Python Selenium
驅動程序版本為2.35
python 3.6.1版
代碼被正確執行,但是窗口上沒有任何顯示。
這是python代碼:
def click_red_links():
try:
driver = webdriver.Chrome(executable_path='C:/xampp/htdocs/scout-project-master/chromedriver.exe', service_args=['--whitelisted-ips="x.x.x.x'])
driver.get('https://www.facebook.com')
driver.maximize_window()
driver.implicitly_wait(30) # wait 30 seconds.
print(driver.title)
driver.quit()
except ValueError:
print('coudl not open the borwser read: {}'.format(WebDriverException))
from selenium import webdriver
def click_red_links():
try:
driver = webdriver.Chrome(executable_path='chromedriver.exe', service_args=['--whitelisted-ips="x.x.x.x'])
driver.get('https://www.facebook.com')
driver.maximize_window()
driver.implicitly_wait(30) # wait 30 seconds.
print(driver.title)
#driver.quit()
except ValueError:
print('coudl not open the borwser read: {}'.format(WebDriverException))
它適用於我使用此網絡驅動程序的Python 3.6.3: https ://chromedriver.storage.googleapis.com/index.html ? path = 2.35 /
ChromeDriver控制台是否打開或Chrome打開,或者運行時什么都沒有發生?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.