Hi,

I want to write a selenium test that clicks away the Guest login modal
window.

See below image for a screenshot of the modal or click here:
https://snipboard.io/fLAHRk.jpg

But the "OK" button in that modal has a changing ID on every reload.
And it has a very generic selector, for example I tried with "#contents
.btn.btn-outline-primary"

But using Selenium it finds too many matches for this selector:
Running command: waitForElementVisible ('#contents
.btn.btn-outline-primary', 20000)

Warning: More than one element (19) found for element <#contents
.btn.btn-outline-primary> with selector: "#contents
.btn.btn-outline-primary". Only the first one will be used.

=> There are obviously too many of those OK buttons. So it's impossible to
click this modal away.

Is there a way to set a CSS class or ID that is unique (and *predictable*!)
so this guest popup can be clicked away via Selenium ?

Thanks
Seb

Guest popup login:
[image: image.png]


Sebastian Wagner
Director Arrakeen Solutions
http://arrakeen-solutions.co.nz/
<https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
<https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>

Reply via email to