I'm starting using Karate for UI testing and not able to find key word to handle popup window. There is a certificate selection window popup, I need to click ok button as the proper certificate is defaulted selected. Any advice and suggestions to click OK button on the popup?
Asked
Active
Viewed 1,280 times
1 Answers
0
If this is a "native" JS popup:
* dialog(true)
Else normal accessing of HTML should work, if you can view-source and see the HTML for the dialog.

Peter Thomas
- 54,465
- 21
- 84
- 248
-
Thanks Peter, but * dialog(true) is not working for me, debug error: << {"error":{"code":-32602,"message":"No dialog is showing"},"id":9}. Also unable to view-source when the popup displaying. Any other advice? could we switch to this popup and click or accept it? – Cotton.Qiu Oct 10 '19 at 00:37
-
@Cotton.Qiu no way for me to comment without seeing the popup sorry. if you can manage to create a sample, follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue – Peter Thomas Oct 10 '19 at 00:55
-
just some more infor for you that this popup is displayed by the browser certificate manager, it's total out of DOM( checked with our devs). Do you think you still could handle it if I try to create sample in github? ( this popup will be removed soon in our project, but if it's worth for the future, then I will try to create sample in github ) – Cotton.Qiu Oct 10 '19 at 01:26
-
@Cotton.Qiu plesse create a sample, I was about to say the same. we will investigate – Peter Thomas Oct 10 '19 at 02:09