R
R
rkfddf2020-02-20 13:03:48
Python
rkfddf, 2020-02-20 13:03:48

How to write iterate over variable in Selenium?

I have the ability to write a query like:
for variable in range(1, 6):
block= driver.find_element_by_xpath("//*[@id='content']/form/table[4]/tbody/tr[' variable ']/td[2]/h3").text

And no matter how I try to write this variable, it displays only the first element. Everything else works correctly. How to properly declare a variable
in python3 ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question