[Issue] ClickItem work in TestComplete but not in TestExecute
Hello, I have a Test Complete project containing approximately 200tests. I executed them nightly with QAComplete on a VirtualMachine with TestExecute installed on it. I have 60% of my tests w...
In the screenshot that goes along with the error, I'm not able to figure out which object is being attempted to interact with in order to execute a "ClickItem" call. ClickItem is supposed to click on an item in another control where that item has either the index or the text that is being passed in as a parameter. So, for some reason or another, the object for whom you are trying to select "ClickItem" for does not exist or is not being properly recognized.
According to the call stack, the error is happening on line 6 of a keyword test. Could you post a screenshot of the keyword test, specifically with details for what is happening on line 6?
In the Web app, the link "Interventions", "Items" ,"Manage"... etc, contain sub elements :
So to call these elements, i use ClickItems : linkManage.ClickItem("User"), linkManage.ClickItem("Repair actions")... etc
What i don't understand is why these elements are recognized when i run in local with TestComplete but not when i run it in VM with testExecute... And for what i checked, it's happen with all tests with the ClickItems statement
Here is the screenshot :
Remark : I use TestComplete 11.31.2420.7 & TestExecute 11.11.1064.11
The object "linkManage" is being recognized in TestComplete as a Select control for which the "ClickItem" method makes sense. In your environment on your TestExecute machine, that is not happening.
Now... here's a point of interest. In the screenshot of your keyword test, the PageAll item is showing the Firefox icon... indicating, at least if I understand it correctly, that in that environment the browser being used is FireFox...
The screenshot in the error log shows that the test is being attempted against Internet Explorer.
It is ENTIRELY likely that there is a difference in object recognition between the two browsers. Is FireFox installed on your TestExecute VM and are you explicitly calling it? That would be my next line of investigation...
Here's another path of investigation. If you note the two logs on the same checkpoint line, you'll note that one is doing a checkpoint on an Alias and one is doing a checkpoint on a Sys pathing... something is not being recognized properly with regards to your objects.
So... here's my thinking... somehow, in your TestExecute environment, your namemapping recognition is not working properly. I'm not 100% sure why, but I suspect it has to do with something in your environment. There are a couple of other clues... the line about Iexplore being maximized has a different caption on the two machines. Your TestExecute log includes some sort of call about clicking a "Don't Show Again" button which is different on the two machines.
I'm sure there's a lot more going on... but to sum up, your environments are NOT the same. Test automation done well means that you have an expected environment that must be present when the test starts. If that environment is not present, the tests cannot necessarily be expected to run cleanly. There are a few ways of doing this:
1) Make sure, physically, that the two environments are 100% configured and set up the same.
2) include in your test automation any necessary scripts, tests, settings, etc., that will be executed at run time to make sure the environments are configured correctly.
3) Include in your test automation "smart" code to detect environmental differences and make account for them.
Since it's pretty obvious that your environments are different, it's not surprising something is working fine in one but not another. Correct the environment issues and try again.