0

I've been using Puppeteer for about a week now but I can't for the life of me figure out how to click on this button:

<input type="button" value="Dismiss this error">

It has a dynamic selector that changes every time the page is opened so I can't use waitForSelector, I also tried using some code from This Post but I'm new to JS so I didn't really know how to adapt it for my purposes, any help would be appreciated.

derloopkat
  • 6,232
  • 16
  • 38
  • 45
lin
  • 1
  • Hi not sure, maybe search for input of type button `await page.click('input[type="button"]');` or `input[value='"Dismiss this error"']` https://stackoverflow.com/questions/53165242/how-do-i-click-a-button-that-has-no-id-using-apifys-puppeteer – IronMan Aug 26 '20 at 00:57
  • Don't you mean `input[value='Dismiss this error']`? Why is the value triple-quoted? – GirkovArpa Aug 26 '20 at 01:09
  • doesn't seem like that's working – lin Sep 07 '20 at 21:18
  • it returns UnhandledPromiseRejectionWarning: Error: No node found for selector: input[value='Dismiss this error'] – lin Sep 07 '20 at 23:18

0 Answers0