Forum Discussion

royd's avatar
royd
Regular Contributor
8 years ago

Can not click on 'caret' - invisible to TestComplete!

In main menu, we have some nested sub-menu, that can be revealed by clicking on caret to expand sub-menu.  The caret is invisible to Object Spy! Tried to record script and keyword test. Both failed!

 

This is probably a good time to mention I am new to JScript/JavaScript! Example will be much appreciated. I am using  TestComplete 12 with Jascript (not converted the scripts to JavaScript yet, due to tight deadline) and IE11. Please see the screens below.

 

 

Thanks in advance.

 

Dave

 

  • royd's avatar
    royd
    8 years ago

    Hi Shaker

     

    Double clicking has no effect. :(

     

     

    After trying everything that has been suggested, realized it was waist of valuable time (tight deadline). I did end up talking to developers, demonstrating the issue. They have agreed to make the necessary changes for it to be visible to TestComplete.

     

    I want to thank every one trying to help me! Kudos to you all! This is a wonderful community and some great people hang out here!! Thank you! :)

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    First of all... super Kudos to how you presented the problem.  We have screenshots of the UI presentation, we have a shot showing us how the item shows up on the web page source, and we have how TestComplete views the item in the object browser.  Without having your application in front of us, this is EXCELLENT information to help us figure things out.

    That said, looking at the way the menu is presented, and unless there is other information, what you'll probably end up doing is clicking on the Link('FODMenu_Emergency') object in your script code, doing a "page.Wait()", and then clicking on the next link.  The reason I say this is that the caret is not actually being rendered, as I can see, as some sort of control but as simply a visual component of the href link itself.  This is why TC is not recognizing it as an object... it's actually part of the Link object.

    • royd's avatar
      royd
      Regular Contributor

      Hi Robert. Thanks for the compliment! I figured, if I am asking for help, better be through. :)

       

      The rub is, when clicked on the menu itself, it populates all forms under the category, but does not expand the sub-category! 

       

       

       

      @ Sanjay

       

      Thanks for your suggestion, I will try and post the result here. The first screenshot is actual shot of Object spy highlighting the menu itself, unaware of the caret. Here is the screen you asked for. I might add, under 'Internet Explorer' (Object Spy > Properties), the innerHTML = <b class="caret" name="caret_Emergency"></b>
      Emergency

       

      and

       

      outerHTML = <a name="FODMenu_Emergency" class="selected" href="#" data-category="Level/2">
      <b class="caret" name="caret_Emergency"></b>
      Emergency
      </a>

       

      I don't know if that helps in anyway.

       

       

       

      Thanks.

       

      Dave

       

       

       

       

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Gotcha.  OK... so,, the next thing we need is to see if there are any methods or such to "expand".  The reason being is that, as noted, the "caret" is being seen as just a class on the link.  Are there other methods associated with the link about clicking on the caret?  Check the NativeWebObject property and see what methods show there, if there are different "click" methods.  

  • sanjay0288's avatar
    sanjay0288
    Frequent Contributor

    Hi,

      Can you please attach a screenshot of the available properties and methods of the Caret object in advanced view mode. Meanwhile you can try with the below mentioned code.

     

    (AUT emergency context menu object)Link("FOD_MenuEmergency).set_IsSubmenuOpen(True)

     

    Regards,

    Sanjay

  • shankar_r's avatar
    shankar_r
    Community Hero

    Hi,

     

    What will happen when you double click the Emergency link.

    • royd's avatar
      royd
      Regular Contributor

      Hi Shaker

       

      Double clicking has no effect. :(

       

       

      After trying everything that has been suggested, realized it was waist of valuable time (tight deadline). I did end up talking to developers, demonstrating the issue. They have agreed to make the necessary changes for it to be visible to TestComplete.

       

      I want to thank every one trying to help me! Kudos to you all! This is a wonderful community and some great people hang out here!! Thank you! :)

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi Dave,

         

        Responsive and ready to help Development is usually the best way to get a fast and reliable solution to the problem. This is good that you can go this way. (Sometimes it is blocked for different reasons.)

        :)