Skip to content

← All questions

The healer proposed a CSS locator when there is a perfectly good label — reject it?

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.

Scenario broke, ran the healer, got a proposal. The patch swaps a page-object locator for a class chain:

ts
this.heal.locator('.f-row--2 .f-ctl input', { description: 'promo code' })

The input has a visible label reading "Promo code". So there is an obviously better locator and it picked the worst one on the list. Do I reject and re-run, or fix it in place and accept?

3 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