Forum Discussion

ybalusamy's avatar
ybalusamy
New Contributor
2 years ago

Popup window without DOM objects

Hi, I am facing an issue handling a popup window that does not have the DOM object I tried all the below on Testcomplete,

page.Confirm.Button("OK").Click();

page.Alert.Button("OK").Click();

page.Prompt.Button("OK").Click();

 

Does anyone have any suggestion to handle this? Like swichto().alert() or something like that or to go through the browser index.

 

5 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    That's your Browser alert dialog, and the coding should be e.g.

     

    page.Alert().Button("OK").Click();
    page.Prompt().Button("OK").Click();
    page.Confirm().Button("OK").Click();

     

    • ybalusamy's avatar
      ybalusamy
      New Contributor

      Thank you rraghvani, it seems page.Confirm.Button("OK").Click(); correct syntax and I tried your suggestion but gave an,

      TypeError: Illegal invocation
       
      In my case, the popup body does not show any html body means these alerts and prompt and confirm objects will not work.