Skip to content

← All questions

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

Asked 8,110 views2 answers

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.

asked by Sam Orbison9,420 ·

2 answers

Know the answer?

Reviewed before it appears. Wrap commands and output in triple backticks and they will render as a code block.

Have a different question? Ask it.

Related