我在Python中使用Selenium和Chrome网络驱动程序,当我运行脚本时,它会正常打开chrome,但是会在“数据”中等待;页面大约需要10秒,然后才能正常转到页面。我可以跳过等待时间并立即转到页面吗? 有我的代码:
class Instance():
driver=None
url=None
def __init__(self,url):
self.url=url
def runInstance(self):
self.driver = webdriver.Chrome(executable_path = "C:\chromedriver.exe")
self.driver.get(self.url)
instance = Instance("https://www.youtube.com/")
instance.runInstance()