D
D
danilr2021-08-16 10:14:54
selenium
danilr, 2021-08-16 10:14:54

How to get to an element in Selenium by nearby text?

I have a form, I need to click on the Button (+) button, which is like a plus in the properties on the screen, but there are no distinguishing marks, the classes are the same everywhere or generated.
Is it possible to somehow find an element in Selenium Python by the text "Properties", since it is nearby, and then tell it to go one level up and take the button in the next block? Or am I overcomplicating and can it be simpler? But it seems to me that searching by text is a good idea, because suddenly the blocks will be rearranged

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