简体   繁体   中英

Selenium webdriver Chrome Method get

I installed Chrome webdriver and when I execute the following code:

from selenium import webdriver
driver = webdriver.Chrome ()
driver.get ('https://www.google.com')

It starts with the blank page, it runs the line 2, opens the chrome driver, but it stays on the white screen .... it's as if there was no code on line 3 ... can anyone help me? thanks in advance.

虽然您尝试使用python编写此文件,而答案是使用Java编写的,但我仍在发布此文件,但请检查逻辑和设置,它是否可以以任何方式帮助您。

WebDriver driver; System.setProperty("webdriver.chrome.driver", "D:\\\\Drivers\\\\chromedriver.exe" ); driver = new ChromeDriver(); driver.get("https://google.com"); driver.manage().window().maximize(); Thread.sleep(1000);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM