在新标签页中打开链接,但保留在原始标签页中python selenium

时间:2018-10-25 21:42:11

标签: python-3.x

from selenium import webdriver
from selenium.webdriver.common.keys import Keys


driver=webdriver.Firefox()

driver.get("site name")

assert "ananymous" in driver.title
continue_link = driver.find_element_by_tag_name('a')
elems = driver.find_elements_by_xpath("/html/body/div/div/div/div/div[4]/ul/li/a")

我想打开网站中所有指向每个新标签的链接

0 个答案:

没有答案