J
J
JRBRO2022-03-29 09:39:35
Python
JRBRO, 2022-03-29 09:39:35

How to add a list of variables in the contains(text()...) line?

Hello. A question such as

driver.find_elements_by_xpath("//*[contains(text(), 'Automation 1)]")'
make it possible to get data instead of Automation 1 from the list, preferably .txt

Here the question is not even so much technical as the syntax, how it should look, does not go out to understand.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
ScriptKiddo, 2022-03-29
@ScriptKiddo

On the example of Toaster

//*[@role='most_interest']//a[contains(text(), 'изнутри') or contains(text(), 'нативного')]

img
6242ad0520c92308429208.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question