Answer the question
In order to leave comments, you need to log in
How to click on links we get with element.text attribute in chromedriver?
Good afternoon. In general, in C # there is such a thing as checking the text of links that is displayed in tolist and clicking on it if the text matches the one that we set, or clicking on everything else except for the text that we set.
The question is how to do this in Python?
The code is like this
driver = webdriver.Chrome()
driver.get('https://yandex.ru/')
for element in driver.find_elements_by_css_selector('#news_panel_news'):
print(element.text)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question