Skip to content

← All questions

Should I commit the suggested locator from a heal log, or go and find out why?

Example threads. These questions and answers were written by the SDODS team to document real problems and how to fix them. The people named are illustrative, not real users. Questions asked on this site are marked new.

Our log has been telling us this for a fortnight:

text
healed "login button": locator('#login-button') → getByRole('button', { name: 'Login' }) via role (score 1.00, 3180 ms). Update the page object.

I cannot tell whether "update the page object" means "paste this in" or "go and find out why". The suggestion is obviously better than the id we had. But if I paste it in, the heal context still lists role: 'button', name: 'Login', so the primary and the fallback become the same thing, which feels wrong.

2 answers

Know the answer?

Wrap commands and output in triple backticks and they will render as a code block.

Checking whether you’re signed in…

Have a different question? Ask it.

Related