Hello,
I am testing an angular website for work. Every time I write a test for a page, the next deployment of the website breaks my tests. It appears that the Pages' element names (or tags) in the elements viewer are named OperationsX where X is a number between 0 and 15. This can be seen in the attached image. These numbers are randomly changing between deployments. I am not sure what could be causing this.
Thank you for the help!
Also, I am having another similar issue where text inputs, buttons, etc are also all tagged "MdIconTagX" where X is 0-9. These also randomly change, but those seem to do so on page refreshes.
4 Answers, 1 is accepted
Found the solution to the first issue. The page tags are actually being generated off of the website 'Title'. Since every page had the title (in the tab) set to OPERATIONS, it was adding OPERATIONS1, OPERATIONS2, etc, etc. breaking everything on deployments.
For others who run into this issue; Have your development team assign a new title to every page. Have it be OPERATIONS - HOME, OPERATIONS - EDIT, etc.
Thank you for contacting Telerik Support Team.
Telerik Test Studio uses an intelligent element identification scheme to auto-generate find expressions. It is based on the element attributes available. However it is important to use static attributes or part of the dynamic ones which is static. This is a requirement for each and every testing framework since otherwise there is no way to identify the element by next execution.
Test Studio offers flexible handling of the find logic used to identify an element and you could adjust it to your application. Elements that are using the same find expressions are merged to a single element. Another thing that you might find useful is the base URL setting available in project settings. I would like to share with you the article for the compare mode of URL by recording that might actually be the answer of your first query.
Please take your time and give a try on the above shared features to adjust your tests to your application. Do not hesitate to contact me in case of any further assistance required. But please bear in mind that we might need access to your application for further investigation.
Thank you for the cooperation in advance and I hope to hear from you soon.
Regards,
Elena Tsvetkova
Telerik
Hello Elena,
Thank you for the help! Those links did help in my understanding of element location and BaseURL usage.
I am however still having issues.
I am adding attachments to this post in order to show what's happening because I might not be able to explain my issue correctly.
I have set my Frames/Pages in the format that can be seen in pic4. The page url (just an example url), can be seen in pic2. The attachment pic1 shows the issue.
When I select an element (HillImage), immediately adds part of the BaseUrl to the frame path properties. This is an issue because we have multiple deployments running at /demo/operations, /testing/april, etc.
So, with the base url https://examplesite.couldservice.net/demo/operations/home, the element is located on the path /home, however telerik stores the path /demo/operations/home. Removing the BaseUrl and the added path values does not fix the problem.
This is what was causing the above issue.
I also found this article that seemingly addresses this issue in tje UsesBaseUrlHost: http://docs.telerik.com/teststudio/knowledge-base/test-execution-kb/base-url. However, as you can see from the images, no such "UsesBaseUrlHost" exists. Also, as I mentioned before, removing the BaseUrl string in the properties did not work either.
Sorry if that was not explained well! Let me know if you ened any more information. Thanks! Brandon.
I am glad to hear the shared articles were helpful for you to understand the concept of BaseURL usage. I noticed that your listed additional query actually duplicates a new support request with ID 1045695 you have submitted. My colleague Nikolay had already provided a reply to it and I would kindly ask you to refer to his advise.
This thread will be closed as a duplicate. Thank you for the understanding and do not hesitate to contact us in case of any future queries.
Regards,
Elena Tsvetkova
Telerik