I am trying to test an application (SAP GUI) on a virtual machine. I noticed that while my scripts performed as expected when I started them from our RFT itself, I had problems with the same part when starting the script from the commandline using Powershell on the same virtual machine.
Inspection of our logs yielded the result that certain of my methods using the exists()
method seemed to be the culprit, as the method took 10-20 seconds to decide if an object existed, instead of a fraction of a second. There also seems a correlation between how many exists()
are used and the extra time the methods needs (I can see duration per method): a method with one exists()
would take 10 seconds, a method with three exists()
would take more than 20 seconds.
My question is: what could cause this unexpected change in behavior, considering the application under test is exactly the same, the machine is exactly the same and the scripts are exactly the same. Only the method of starting the scripts is different as far as I can tell. Also relevant for this discussion: in both cases the same JVM is used.
Even a pointer in the right direction would be very much appreciated, as this problem is hard for me to get a grasp on.