Pro tip: Avoid relying *only* on text for selenium locators to find particular text. Combine it with other attributes!
Like:
`//button[contains(@class, 'submit') and contains(text(), 'Login')]`
Way more stable than just text matching.
For debugging, Selenium IDE (Firefox/Chrome) can record actions and show what locators it picks. Not perfect, but helps!
Like:
`//button[contains(@class, 'submit') and contains(text(), 'Login')]`
Way more stable than just text matching.
For debugging, Selenium IDE (Firefox/Chrome) can record actions and show what locators it picks. Not perfect, but helps!
