0

I am extremely new so please explain as simply as possible to me. I'm trying to press a button that pops up as confirmation automatically, but it has no ID and so I can't figure out how. The buttons html is <input type="button" class="beigebutton thingbutton dialog-submit" value="Okay">

I've tried document.querySelector('#button').click() with button being replaced by everything I can find, as well as const inputElement = document.querySelector('input[value="Okay"]'); inputElement.click();

I've also tried document.querySelector("#archaeology-dialog > div > input") but nothing seems to actually work. I appreciate any help given, I'm very new and this has me stumped.

Tyr
  • 1
  • `.beigebutton` might be enough. If other buttons have that class, add some more specificity with other classes or with the tag name or another attribute – CertainPerformance May 22 '22 at 02:28

0 Answers0