Several tests just started failing the other day - failing to find the element to click on to initiate a login. I assumed something on the site changed so I created a new simple test with just two steps, go to the site and click logon. It works. But the new test step that clicks the login is identical to that in the test that has worked for months and now has quit working.
7 Answers, 1 is accepted
Hello Ron,
I am sorry to hear you have faced any misbehavior with Test Studio and will be happy to assist you with that.
First thing to mention is that each recorded step is associated with an element in the Elements Explorer. Each separate element in the repository is actually using a different find expression, which is used to locate the element on the page when executing a test.
Having that said, I suppose that the attributes used in the find expression for the Login button, are no longer the same on the page. And that explains why the newly recorded test works as expected - the new step entered a new element in the Element Explorer, which uses the current values of the attributes.
If this is the case, of course, it is not necessary to re-record the step by each minor change in the application - Test Studio allows you to modify the element's find expression.
Please, take the time to give this a try. In case this is still not working, please, collect the Step Failure Details and send these with your response. You can use the Export button on the Failure tab - it will export a zip file with all necessary details.
Thank you in advance for your cooperation.
Regards,
Elena
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Thank you very much for helping focus my brain. I suspected that was the cause but the elements tab (so small and grey on this 4k screen) just escaped my view. Digging though those helped identify the old & new elements and the subtle difference between the two.
So, in thinking about changing the failing test to reference the new/correct element, do I simply "rename" that 'step' and use the new element name? In my case it's just the old one with 0 at the end. What I ended up doing that worked was just coping the working step that referenced the newly updated element to the other tests.
Hi Ron,
I am pleased to know that the provided information was helpful for you.
In regards changing the element used in a step - one of the options is to replace the step with the newly recorded. This is what you did already to update the tests on your end.
Another option is to change the target element in the step properties and choose the newly recorded - the property is named PrimaryTarget.
The last option you can go for is to simply edit the existing element's find expression to reflect the changes in the tested application. Some further notes in regards such failure message can be found here.
I hope these notes will also help in the project maintenance process. Of course, in case of further questions, please, let me know.
Thank you for your cooperation once again.
Regards,
Elena
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Hi Ron,
I am glad to know that the shared information was helpful for you.
As a side note and as it seems you are using a large display, you can take the time to change the Test Studio layout as it will be more convenient for you. You can choose between the predefined layouts or adjust the panes as per your needs.
Thank you for your time in our conversation.
Regards,
Elena
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Hi Ron,
Great to hear you adjusted the layout in a suitable for you way. In regards your other note you recently submitted a feature request to our feedback portal, so you can follow the item to get updates on its progress.
Thank you once again for your cooperation in this discussion.
Regards,
Elena
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.