Forum Discussion

Antonio_Haynes's avatar
Antonio_Haynes
Contributor
11 years ago

Aliases are including created with sys and appended with "()"


When recording a test in a web browser controls that are automatically mapped are mapped  with sys in the alias. I've tried removing sys from the alias tree but it keeps comming back. I have my setting for record over tested app enabled and have it set to not automatically add tested apps during recording but that does not seem to help the issue. e.g. Aliases.Sys.browser.myTestedApp.xControl



Also when closing and reopening a project or project suite i find that my keyword test commands are having each alias in the hierarchy appended with "()".



e.g. Aliases.browser.myTestedApp.xControl

this is what I have before closing and when i open it back up its then Aliases.browser().myTestedApp().xControl()



This causes the keyword test to fail sometimes not recognizing the control.

The only way I've managed to fix this issue is by going into each command and removing "()" everywhere I see it in the alias wich is quite time consuming and really a roadblock when its a test with many steps and long aliases.



Please help me with a solution if possible.


  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Antonio,

     


    It's unclear for me when and why the brackets are added to the test code. Could you please record a video demonstrating this behavior and send it to our Support team so that they could investigate the situation?


     


    BTW, please make sure that you are using the latest TestComplete version - v. 10.30.


     

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Antonio,

     


    Thanks for the video. I have never observed such behavior.


    Could you please follow the steps below to help us investigate the issue?


     


    1. Run the Report Generator tool located in <TestComplete>\Bin\ReportGenerator.exe.


     


    2. Select the "Launch/attach to TestComplete" option.


     


    3. Reproduce the issue.


     


    4. Click the "Generate..." button in the Report Generator tool and save the report to a local folder.


     


    5. Send the report to our our Support team. Please send them the recorded video, as well.


     


    Thanks.


  • Sorry for the delay in response, I took an extended leave from work and just remembered that I had posted this. :( 



    Anyways here is a jing of what is happening:



    Jing



    I am using TC 10.3 my os is windows 7 64 bit browsers are Chrome Version 36.0.1985.125 m (not currently testing) and FireFox 30, IE11 Version: 11.0.9600.17207



    So when I am adding a new control to my list of aliases via recording in a keyword test. TestComplete adds the new alias under a sys branch in my name mapping. As I had stated previous I have tried moving those controls out of the sys branch and into the bowser branch of my aliases, then removing the sys branch entirely, to no avail. The Sys branch continues to replicate itself after deletion with not just the new control I add during recording but the entire browser branch and every alias I have in that branch. Not sure if Sys is correlated to the issue of the appended parens "()". However I am sure that Sys in my alias name has caused me issues with playback of my tests.



    As for the parens "()". I really do not know what to say here. The Jing is my best discription. Please feel free to cascade me with as many questions you may need to help resolve this issue. It haunts me to no end. :p Also to note it does not always seem consistant in how it happens. sometimes a test that has never had an issue will just do this one morning when I open it. Once I have this issue it pretty well stays an issue, and in some extreme cases I have become frustrated to the point of scrapping the project and starting a new one.