Answer the question
In order to leave comments, you need to log in
Click all links on a page?
There is this code:
def setUp(self):
self.driver = webdriver.Chrome()
self.driver.get('https://yandex.ru')
def test_01(self):
# def links_parse(self):
driver = self.driver
driver.fullscreen_window()
links = []
links = driver.find_elements_by_xpath("//*[contains(@href, 'http')]")
# def clicking(self, links):
for link in links:
link.click()
driver.get('https://yandex.ru')
time.sleep(4)
def tearDown(self):
self.driver.quit()
Answer the question
In order to leave comments, you need to log in
how can they be "not interactable"
So it's possible
for link in links:
link.click()
driver.back()
time.sleep(4)
from selenium.webdriver.support.ui import WebDriverWait
WebDriverWait(driver, 100).until(
EC.element_to_be_clickable((By.XPATH, "//input[contains(@value,'Назад')]")))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question