Y
Y
yamudaqq2020-04-28 00:13:00
XPath
yamudaqq, 2020-04-28 00:13:00

Click on element with random selenium class name?

You need to click the "Next" button in the huhl account registration form.
qLDt64wYSl6tuWiJudCnTA.png
The problem is that this button doesn't actually have any recognizable characters, and its class changes after every page refresh. Is there a way to click it with ? if not, how to implement it? registration link:
driver.find_element_by_xpath(' - ').click()

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Daria Motorina, 2020-04-28
@yamudaqq

If the element does not have a unique identifier, then it is necessary to choose a relative identifier (composite), e.g. div1 > div2 > div3[0] (figuratively, in xpath it is written differently)

A
Alexey Sundukov, 2020-10-01
@alekciy

You need to click the "Next" button in the huhl account registration form.

For buttons on parsing, the construction usually works very well:
//*[contains(text(),'Далее')]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question