Forum Discussion

samantha_chin's avatar
samantha_chin
Occasional Contributor
9 years ago

Not able to record button click for Confirmation dialog in Edge

Hi,

 

I tried to search on this forum on the Edge dialog popup and seems like many complaining that it is not working. I would like to understand whether is there any workaround to get Yes or Cancel button click to move forward? I am using Windows 10.

 

Eg. Click Logout and it will prompt "are you sure" confirm dialog popup.

 

I use the object spy and not able to highlight the YES button at all..it just highlight the whole Edge browser.

7 Replies

  • I don't use the Edge browser so I can't say what you can or can't do to fix this.

     

    However, if the browser itself is still active, you should be able to send "Keys" to the current page and these will be picked up by the modal window (your dialog box .... assuming it's a modal type dialog).

     

    You can probably use hotkeys (if the dialog uses them .... like "CTRL+Y" for yes or something) or ESC or ENTER will usually work here as well.

     

    But I suspect you'd want to know what a dialog was for and what it said before randomly/blindly keying past it?

     

    No?

    • samantha_chin's avatar
      samantha_chin
      Occasional Contributor

      Hi Colin,

       

      At this moment I am trying to automate click it blindly first to see it work. Thanks for the tipson hotkeys! 

      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        Hi Samantha_chin,

         

        TestComplete doesn’t recognize Edge as a browser on your computer for some reason. Take a look at the children of the Sys object in the tree you posted – you have the Process object instead of Browser (as in my image).

         

        So, first of all, we need to make TestComplete recognize the browser correctly. Please make sure that the Tools | Options | Engines | General | Enable support for Windows Store application testing option is enabled. Please read this article for more information:https://support.smartbear.com/viewarticle/77787/

         

        Also, to test Edge, TestComplete must be installed into a subfolder of the <Program Files> folder (or <Program Files (x86)> on 64-bit operating systems). If the product isn’t installed in that folder, you would need to reinstall TestComplete.

         

        Let us know your results.

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Samantha_chin,

     

    I’ve found out that TestComplete 11.20 is unable to record actions over the objects located on a confirmation dialog in Edge indeed. I’ve reported this behavior to our R&D team.

    However, I see that TestComplete displays those objects in the Objects Browser:

     image-2016-01-06-12-24-30-022.png

     

    In this case, you can modify your test by adding the code to click the button you need. For example:

    function Test1()
    {
      var page;
     // obtain your test page
      page = Aliases.browser.Page("http://www.w3schools.com/jsref/met_win_confirm.asp")
      page.Confirm.Button("OK").Click();
    }

     

    • samantha_chin's avatar
      samantha_chin
      Occasional Contributor

      Hi Tanya,

       

      I can't find button OK in object browser (not the same as your screenshot) and I have tried your code it did not manage to find the page to trigger OK button. Maybe because I'm using Windows 10?

       

      Edge.png