Closed archcorsair closed 5 years ago
Additional screenshot for context:
Update: Doing some personal investigation lead me to these resources:
I've discovered the issue is that there is a limitation in CSS itself where if the id of the element starts with a number, it must be escaped. This is causing issues because the escape character itself \
is not being escaped when generating the script. I was able to fix the above error by additionally escaping the escape character.
Example: (was)
await page.click('.error #\35 11\3A 0')
Now:
await page.click('.error #\\35 11\\3A 0')
Hey @archcorsair that is a nice corner case. Kudos on finding the solution. I don't think we are going to tackle this in Puppeteer Recorder. Closing this issue.
Puppeteer-recorder is grabbing this selector:
causing Puppeteer to throw this error:
SyntaxError: /Users/nxc/w/salesforce-puppeteer/test/recorded.test.js: Octal literal in strict mode (73:39)
I suspect this might be a unique issue to the product I'm working with because it is a salesforce based application where it renders nested iFrames. Creating a test script manually works, using a helper I wrote to fetch the nested frame I need:
Any suggestions regarding this specific use case would be appreciated