I have recorded several TestComplete tests for our desktop application. Anytime I playback a test using the format of a command line prompt that directly calls the project suite (as shown below), it works great
start "<title>" /wait "C:\Program Files (x86)\SmartBear\TestComplete 14\x64\Bin\TestComplete.exe" "<project file path>.pjs" /r /p:<project name> /exit /SilentMode
As I mentioned in another recent post I made, however, we are starting to set things up so that a master workstation parcels out the tests to slaves and so now i'm using this format of the command line prompt
start "<title>" /wait "C:\Program Files (x86)\SmartBear\TestComplete 14\x64\Bin\TestComplete.exe" "<project file path>.pjs" /r /p:<project name> /t:"NetworkSuite|Jobs|Job1|Task1" /exit /SilentMode.
Task1 points to the exact same project name used in the former example. Now, while most of the steps in the test run fine, anything step that was recorded using the DblClick method (to double click on and select a tab or table entry) fails. For some situations where the double click action isn't 100% necessary I might be able to get away with changing the DblClick method to the Clicktab("tabname") as that format doesn't seem to have an issue. For example, this works to select something on the screen:
but this way would fail using the Mapped Name of the tab:
Call Aliases.MyProduct.HwndSource_AppWindow.AppWindow.tcBottom.ti_doctype.DblClick(90, 15)
and would put this error in the log:
“There was an attempt to perform an action at point (90, 15) which is transparent or out of the window bounds.”
There are other places in my application that absolutely have to be double clicked and I don't know how I going to get around this issue for those spots.
Has anyone ever dealt with this type of behavior in TestComplete/TestExecute?
Solved! Go to Solution.
I mention the solution to this in my other post called "A Tale Of Two Slaves"
Rather than the double click being the problem, I would look at the two examples you gave and the error message.
The difference in your two examples is that in the first one you are using an object name and the second one you are using coordinates. The error message is telling you that TC can't find the coordinates.
You can try to solve the issue with not finding the coordinates, but you'd be much better off if you don't use the coordinates and use the object name instead. As you can see, the coordinates are not reliable, and they will result in your tests not being as portable as you need. Screens are different and test systems are different, so the coordinates will likely not be consistent, where the object name will remain the same throughout.
i have no problem with using the name, however, intellisense did not seem to offer a version of the double click method that allowed using a name. Only the ClickTab method which imitates a single click. There are certain spots where the double click action is an imperative. I will continue to research, try different things, see what i can come up with and report back. Any help is welcome. Thanks!
My bad, they're not screen coordinates, they're coordinates of the actual object
Try leaving out the coordinates (that's one of the examples in the article) and see if the double click happens.
If that doesn't work, then I'd dig deeper into the the error message. Is there any machine where the test runs as expected?
You mentioned that the problem started happening when you shifted to the Network Suite. So, while @Marsha_R suggestions are still valid, I'd look at a couple of other things as well.
ClickTab is executing a specific action on the tab that doesn't require the recognition of screen location where as DoubleClick is doing a screen location. What this seems to indicate to me is that the remote machine executing the network job MIGHT be dealing with screen resolution issues where the object may be dimensioned smaller than on the originating machine. So, while a pixel location on the object of 90,15 may work on the developer box, that might not work on the remote box. If you don't want to have to mess around with changing code around too much, you might want to see what screen resolution, scaling, etc., is implemented on that remote box.
@tristaanogre fyi, the link I posted to the double click documentation actually says it's *not* screen coordinates.
True... but let's say that the screen resolution on the remote machine is smaller. So, the object itself is smaller, pixel wise. So 90,15 may be outside of the bounds of the object on the remote machine. It's still worth investigating... the alternative is to remove those co-ordinates from the DblClick method.... always a good practice unless you explicitly need them. But making sure resolutions match would resolve the problem, potentially, throughout the code and not just on that one line.
the alternative is to remove those co-ordinates from the DblClick method.... always a good practice unless you explicitly need them.
Which is what I recommended above... 🙂
Thank you Marsha and Robert for the suggestions!
Hi @GradyJr , how is the investigation going?
using click where dblclick is not essential resolved some of my errors but even though I've removed all coordinates from the remaining dblclick methods it still doesn't work. As the remote machines are VM's I'm apparently unable to even view the screen resolutions much less change them (see attached image). For the time being, just so i can get a project suite to run from start to finish, i've removed the tests that require a double click from the project and will continue to work on figuring out a solution. I will post back when I find the answer.