checkly / headless-recorder

Chrome extension that records your browser interactions and generates a Playwright or Puppeteer script.
https://checklyhq.com/headless-recorder
MIT License
15.03k stars 722 forks source link

add option to use ARIA nth model ? #186

Closed hugodlmm closed 1 year ago

hugodlmm commented 2 years ago

I wanted to record instagram input but I find that every class name are random values. So here is my question, is it possible to add an option to record with ARIA nth model ? e.g :

await page.waitForSelector('body > section > div:nth-child(2) >  div:nth-child(1) > button)
await page.click('body > section > div:nth-child(2) >  div:nth-child(1) > button)

instead of :

await page.waitForSelector('body > .RnEpo > .pbNvD > ._1XyCr > .bIiDR')
await page.click('body > .RnEpo > .pbNvD > ._1XyCr > .bIiDR')
ianaya89 commented 2 years ago

@hugodlmm thanks for reporting. We are currently doing a re-work in our selectors engine and it will work with a similar approach you propose. Will keep you updated.

ianaya89 commented 1 year ago

https://github.com/checkly/headless-recorder/issues/232