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>

Please give any suggestions for it. Thanks

  • Can you add HTML code for the modal mentioned? – Bharadwaj Pendyala Nov 4 '18 at 13:12
  • Added the HTML Code – Jagannatha Mv Nov 4 '18 at 13:19
  • You will probably need something as browser.switchTo() because modals are not a part of the same window. – Saša Zejnilović Nov 6 '18 at 6:17

Did you try using below XPath

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.