I have been dealing with this problem for a while now and im not sure why my program is functioning this way. Whenever I try to click a button on a "pop-up", the automation will click the upper left of the screen, even though the button is near the center of the screen. The "pop-up" is not a new window btw, it is just something that is on the screen. Me and my coworkers are able to automate the other "pop-ups" we use just fine. For some reason though, this one is behaving differently.
Heres the HTMLbutton that im trying to target:
So I was wondering, is there like a premade function for clicking coordinates on the window? or would there be a different way i could approach this?
8 Answers, 1 is accepted
Please let me know first of all if this button is part of a frame? Here is further details how frames are supported in Telerik Testing Framework.
If this element appears additionally you might need to refresh the DOM tree. This could be done in a coded step with the following line of code:
If this still does not fix your script, please let me know if you could provide me access to your application along with the script to test it on my side. Second best option would be to capture a Fiddler trace against the faulty page. We have about a 75% success rate using a Fiddler trace to simulate your web server and reproduce problems. To capture the traffic please follow these steps:
1 Start Fiddler - note no browser should be open
2 Click Clear Cache
3 If your site uses HTTPS click Decrypt HTTPS traffic
4 Start Capture
5 Launch a browser
6 Navigate to the problem page and pop up.
7 Stop Capture
8 Save Capture
9 Put the .SAZ file into a .zip file and attach that to this support ticket
In case this is not applicable as well please share the parent elements within which the button is located so I could try to reproduce it on my side.
Thanks in advance!
Telerik by Progress
Here is the parent element for the button
This just encompasses the instructions "pop-up". Thanks for the help!
Please note that clicking on the upper left corner of the page is usually a sign that the element is present in the DOM, but is not displayed on the page. If there is something on the foreground that is covering the entire page that will make sense, however without access to the tested application we cannot determine this. You can also try downloading the Test Studio trial and try recording against the button in question, what is the result? Are you able to record against the button? Are you able to highlight? This will show clearly whether there is something covering the entire page.
Another way to proceed will be to provide access or fiddler trace so we can investigate. Please note that if you are going to provide sensitive information you should do this in a ticket, where all the information remains private, not in this thread in the public forum.
Telerik by Progress
So I download the Test Studio to see if that helps. The test studio was able to excute it just fine but in doing that, it messed something up with my telerik frame work and now I cant run any tests from visual studio. i tried redownloading and reinstalling but nothing changes. i get the error message:
In the past when i got this error it usually just meant i need to update my framework.
Im receiving a more detail error now:
As of the error message you share I assume your framework version is an older version and installing the latest full Test Studio suite messed up the assemblies. Additionally it is recommended to always upgrade the testing framework itself to the latest version. What you could do now is to remove the Test Studio installation first, then upgrade the testing framework. At this stage I would recommend you try to click on the button again using the previously created code since occasionally if it is a bug it could be fixed. If the behavior is still the same install the trial version of Test Studio again and check what is the find expression used for that element.
Please share your observations once you gather any. Thanks for the cooperation!
Telerik by Progress
So it was an updating issue, but i had to do a little more than that. The way my project is set up, I need to build three seperate solutions so it took me a while to pinpoint the problems i was having. I ended up deleting the Telerik.TestingFramework.Interop because it wasnt getting uninstalled with the framework. After reinstalling and rebuilding my projects did it start working.
Also my button is now being click on the website! the main difference i can see was that i was trying to use innertext and the test studio used TextContent instead. im not sure what the difference is but its all good now.