我正在尝试设置python selenium来处理我的WSL2(Kali)。 我跟随这篇文章https://www.gregbrisebois.com/posts/chromedriver-in-wsl2/
在终端中运行“谷歌浏览器”会返回一个正常工作的浏览器
尝试运行此测试脚本会导致出现一个浏览器窗口,但在driver=webdriver.Chrome()运行后,没有任何内容加载到该窗口,也没有代码
from pyvirtualdisplay import Display
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
import time
print('starting')
driver = webdriver.Chrome()
driver.get('https://www.google.com')
print('Worked')
driver.close()
目前没有回答
相关问题 更多 >
编程相关推荐