Skip to content

← All questions

Can I put an XPath in the css fallback list of a heal context?

Asked 11,470 views2 answers

Our app renders a summary table where the only stable thing about a row is its position relative to a header cell. The reviewer agent keeps flagging the selector, so I was going to declare a fallback for it:

ts
readonly total = this.heal.locator(this.page.locator('.summary .total'), {
  description: 'order total',
  css: ['xpath=//table[@id="summary"]//tr[last()]/td[2]'],
});

Does the healer accept that? And if it does, is it a terrible idea?

asked by Kostya Petrov7,903 ·

2 answers

Have the same question?

Ask it with the command you ran and the output you got, and it will be answered here.

Ask a question

Related