P
P
PesyCorm2021-03-19 23:57:59
css
PesyCorm, 2021-03-19 23:57:59

What are unstable selectors or how to find elements competently (Selenium WD)?

Hey! Recently I met with such a concept as "Unstable selector". It is implied that it is bad practice to use such selectors.
For example, this one is unstable (located on yandex.ru):

"button.mini-suggest__button.button_theme_websearch.button_size_ws-head.i-bem.button_js_inited"

Question: what are "stable" selectors, how can I understand that the selector I have chosen is "stable"? And are there any guidelines for finding an element by other ids (like class name, id, etc.)
Thanks!

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