Forum Discussion
4 Replies
- vajindarladdadFrequent ContributorHi Johny,
I would recommend to use scripts & not to use Recored and Play method.
The problem you are facing now is because you have not set Delay between 2 steps.
The test completed hasexecuted the steps to open the "Tested" application but in reality , it take time to lauch that application (some splash screen will appear first & then the MainWindow of the application) . By the time the "Tested Application" gets really lauched on the screen , the TestComplete executes next statement , which will ultimately fail as the application is not launced completely.
Johny , I would highly recommend you to create the script and launch the appliction.
There are some really useful functions that you can use to wait until the particular object get exists.
If you are stick record and play method , you have to insert Drag and Drop "Delay" statement for better stability of the test.
TestComplete does work perfectly fine with some really heavy Engineering applications.
I hope this has been of some help. - johnnychlorideNew ContributorI've found what appears to be a clue to this issue:
The scripts use the windows envirnment variable %programfiles% to resolve "C:\Program Files", but in Test Complete, the variable %programfiles%="C:\Program Files (x86)"
I've tried to reload Environment Variables via Tools/Options/Engines/Tested Applications but these are incorrect ("C:\Program Files (x86)") as well.
From the Set command from cmd prompt shows the correct value.
Test Complete is running as the same user.
How to override a Windows Environment Variable in Test Complete to workaround this issue?
Hi Johnny,
Could you please zip your entire project suite folder along with the log of the failed test execution and post it here?
Also, please let us know what value is specified in the %ProgramFiles% variable in Tools | Options | Engines | Tested Applications.
- johnnychlorideNew ContributorHi to you both and thanks for taking the time to respond to my question.
I've found the root cause of this issue - there seems to be an issue with the way Windows .bat files resolve the %PROGRAMFILES% Environment Variable when called from another application that is x86 rather than x64 (in my particular environment - virtual, connected with rdp etc etc).
I could isolate the problem by testing with another scripting solution that had a x86 and a x64 version. Specifically:
- if a .bat is called from x86 .exe, then the .bat resolves %PROGRAMFILES% as C:\Program Files (x86)
- if a .bat is called from x64 .exe, then the .bat resolves %PROGRAMFILES% as C:\Program Files - correctly in this case.
Just running the .bat makes the variable resolve correctly to C:\Program Files.
So from this I believe the issue is not TestComplete, just Windows in this particular environment :).