1

I Have an application developed using Electron+Chromium when browser launched without any URL there will be a popup.

This is a modal popup and using selenium I'm unable to handle this popup.

enter image description here

HTML Code for Modal popup

 <div class="mt-4">
 <button id="btnCancel" class="btn btn-secondary btn-danger btn-radius" data-i18n="checkSecurityPage.quit">Quit</button>
 <button id="btnNext" class="btn btn-primary btn-radius" data-size="l" data-style="slide-left" data-i18n="checkSecurityPage.next">Next</button>
 </div>
 </div>

Please give any suggestions for it. Thanks

asked Nov 4, 2018 at 13:08
3
  • Can you add HTML code for the modal mentioned? Commented Nov 4, 2018 at 13:12
  • Added the HTML Code Commented Nov 4, 2018 at 13:19
  • You will probably need something as browser.switchTo() because modals are not a part of the same window. Commented Nov 6, 2018 at 6:17

1 Answer 1

1

Did you try using below XPath

//*[@id="btnCancel"] to quit

//*[@id="btnNext"] to proceeding to next

answered Nov 4, 2018 at 13:22

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.