Below is a submit button on the page I am trying to test.
When you click this button, a pop-up window is displayed. The URL of this pop-up is https://login.microsoftonline.com/........etc.
This sign in uses SSO, but we are having difficulty bypassing the sign-in process using requests.
So we are instead trying to capture the URL of the pop-up during the test.
I have seen examples where people retrieve the href attribute of a button. However, as you can see above, there is no href on this button.
I've searched the HTML for a form element too, but can't find that.
I'm just wondering, is there a way I can get the URL of the pop-up window that clicking the above button generates?

To catch the URL, try adding an intercept before the click
Note this is debugging code only to help find the URL. Don't use it in a long-term test.
Additional notes:
I'm assuming
'POST'as it's most common forsubmit, but may need'GET'instead.using
'*'will catch anything, so you may catch so stray requests from the page load with the firstcy.wait('@submit'). If so, just add morecy.wait('@submit')or a longcy.wait()before the click.