所以,如果我做以下事情:
driver = webdriver.Chrome() # this results in the browser displaying the about page
driver.get("http://somesite.com/") # now the browser goes to the URL
Run Code Online (Sandbox Code Playgroud)
然后,如果我通过浏览器中的javascript控制台检查历史记录长度,则得到值2.我需要模拟使用URL打开新选项卡或窗口的情况,因此历史长度为1.
提前致谢.