Using GEB, how can I very text and click OK in an alert box

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Using GEB, how can I very text and click OK in an alert box



I have a basic alert box with OK or Cancel options



enter image description here



Using selenium, it was easy to use alert.getText() and alert.accept. How can I handle this same scenario using GEB?


alert.getText()


alert.accept



It looks like I can verify the text using withConfirm, but I can't figure out how to click the OK button.


assert withConfirm(true) { $("input", name: "showConfirm").click() } == "Do you like Geb?"









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Stripe::AuthenticationError No API key provided. Set your API key using “Stripe.api_key = ”

CRM reporting Extension - SSRS instance is blank

Keycloak server returning user_not_found error when user is already imported with LDAP