如何在不打开新选项卡(python)的情况下更改Selenium中的URL?
我在java中看到了一些.navigate()函数,但在python中没有 那么,我如何在不打开新选项卡的情况下更改当前打开窗口的URL 谢谢只要再打一次如何在不打开新选项卡(python)的情况下更改Selenium中的URL?,python,selenium,url,webdriver,Python,Selenium,Url,Webdriver,我在java中看到了一些.navigate()函数,但在python中没有 那么,我如何在不打开新选项卡的情况下更改当前打开窗口的URL 谢谢只要再打一次driver.get('yourURL')。例如: driver = webdriver.Chrome() driver.get('https://google.com') print(driver.current_url) driver.get('https://gmail.com/') print(driver.current_url)
driver.get('yourURL')
。例如:
driver = webdriver.Chrome()
driver.get('https://google.com')
print(driver.current_url)
driver.get('https://gmail.com/')
print(driver.current_url)
输出:
https://www.google.com/
https://www.google.com/intl/id/gmail/about/#