I'm developing a testing tool using selenium driver in java.
The portal I'm testing has a pop-up or dialog box, where it has an OK button. My tool needs to press .clik () on this button, I can not select the button id because I can not use F12 or xpath to identify the html of the popup.
I found this code, but without identifying the id of the button its action is not exercised.
driver.switchTo().window("[handle da sua janela]");
driver.close();
insira o código aqui
// Or a click on the ok button path
What can I do?