Forum Discussion

courtenayp's avatar
courtenayp
Contributor
8 months ago

Alert/Confirm object message property is now blank using Chrome 114/116 and TC 15.54

Have just upgraded to latest TC, it now appears that all the message property content of alert/confirm objects in chrome are picked up by TC as blank instead of the previous message content that was mapped. The message can now only be picked up by mapping another child object to all existing alert/confirm objects as a Label object.

This is the case for chrome 114 and 116.

 

1. do we have to update all of our previously mapped alerts with message property to now have a child label object, or

2. can we get back the mapping of message content directly on the alert/confirm objects

 

editing to add, on further look at other examples, on some alerts, there is now the additional "label" message object, but also some of the text remains inside the parent alert object and is not accessible now via that object's message property (As it is blank)

6 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    TC supports Edge and Chrome up to 114, doesn't mention the specific browser version. However, in Edge v116.0.1938.69 (Official build) (64-bit) it is shown,

    If the browser gets updated, you might have to update your name mappings again.

    • courtenayp's avatar
      courtenayp
      Contributor

      Hi,

      You are showing in the above screen shot, the Alert.Label message property, not the Alert message property which is the level at which it was previously picking up the Alert's message content. I am using TC 15.54 as mentioned above with Chrome 114 which it says it supports. I was previously on old versions of both TC and Chrome and did not upgrade for ages because there are always issues with chrome - however since it said this version combination should work i proceeded with the upgrade.

       

      I have changed some of my mappings to this apparent new structure, its not worth the time working out the root cause. I will just have to change them all at each point my test is now failing, and hope the structure does not change again.

       

      I will also need to upgrade to TC 15.55 it seems now because there is another issue which already has a discussion where the alert OK buttons are now not clickable - so hopefully this doesnt introduce even more issues.

      • jkrolczy's avatar
        jkrolczy
        Regular Contributor

        From my latest testing using MS Edge 116 and TC 15.55, the Alert popup OK button is clickable.

        The Confirm popup OK button is still not clickable, even though it can be found and the mouse can hover over it, Click() does nothing.

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Try the following JavaScript code to test TestComplete Dialogs Sample

    function DialogTest()
    {
        Browsers.Item(btEdge).Run("http://secure.smartbearsoftware.com/samples/testcomplete15/dialogs/");
        var page = Sys.Browser("edge").Page("http://secure.smartbearsoftware.com/*");
    
        // Alert sample
        var btn1 = page.Panel("page").Panel("dialogBox").Link(0);
        btn1.Click();
        Log.Message(page.Alert.Label("Message").Text);
        aqObject.CheckProperty(page.Alert.Label("Message"), "Text", cmpEqual, "Alert button is pressed.");
        page.Alert().Button("OK").Click();
        
        // Prompt sample
        var btn2 = page.Panel("page").Panel("dialogBox").Link(1);
        btn2.Click();
        Log.Message(page.Prompt.Caption("Message").Text);
        aqObject.CheckProperty(page.Prompt.Caption("Message"), "Text", cmpEqual, "Please enter your name");
        page.Prompt.TextBox("Value").SetText("SmartBear");
        Sys.HighlightObject(page.Prompt().Button("Cancel"));
        page.Prompt().Button("OK").Click();
        
        // Confirm sample
        var btn3 = page.Panel("page").Panel("dialogBox").Link(2);
        btn3.Click();
        Log.Message(page.Confirm.Label("Message").Text);
        aqObject.CheckProperty(page.Confirm.Label("Message"), "Text", cmpEqual, "Press a button");
        Sys.HighlightObject(page.Confirm().Button("Cancel"));
        page.Confirm().Button("OK").Click();
        
        // OnBeforeUnload sample
        var link1 = page.Panel("page").Panel("dialogBox").Link(3);
        link1.Click();
        Log.Message(page.Confirm.Label("Message").Text);
        Sys.HighlightObject(page.Confirm().Button("OK"));
        page.Confirm().Button("Cancel").Click();
    }
    

    Works fine in Edge v116.0.1938.69 (Official build) (64-bit) and Google Chrome v116.0.5845.141 (Official Build) (64-bit)

    • courtenayp's avatar
      courtenayp
      Contributor

      hi this doesnt solve my issue as i can see you are using the new "label" child object of the alert/confirm that now appears to be there, there are still other parts of text within theses objects that is totally unrecognisable.

       

      anyway, after also jumping on the post about the OK buttons not working and that is still not resolved with chrome 116 and TC15.55 i have reverted back to my old version of chrome, because im wasting time trying to work out a combination that works again - it seems ok with old chrome and TC15.53 (i tried TC15.55 and that version does not recognise alert/confirm object at all going back to chrome 106, and i tried TC15.54 and that version does not recognise all alert/confrim message content + has a child "label" object now being added which contains some of the message content of the alert/confirm object)

       

      to summarise (all below using chrome 106, also 114 seems fine)

       

      TC15.53 - recognises the alert/confirm fine including the text within it under a Message property

      TC15.54/55 - recognises the alert/confirm fine, but only recognises part of the text in it under a NEW child object with ObjectIdentifier "Message" and ObjectType "Label"

       

      Below screenshots show the TC15.55 2x objects found with label child object only showing irst line of confirm dialog, and TC15.53 a single alert object with message property containing the ALL the text

       

      there is clearly a change in TC15.54

  • According to the SmartBear Community[1], after upgrading to the latest version of TestComplete, the message property content of alert/confirm objects in Chrome is picked up as blank instead of the previous message content that was mapped. The message can now only be picked up by mapping another child object to all existing alert/confirm objects as a Label object. This issue is present in Chrome 114 and 116. MyLabCorp

    To address this issue, you can either update all of the previously mapped alerts with message property to now have a child label object or try to get back the mapping of message content directly on the alert/confirm objects. However, it is not clear from the search results if there is a way to get back the mapping of message content directly on the alert/confirm objects.