Forum Discussion

nazz's avatar
nazz
Occasional Contributor
14 years ago

How to specifiy file path for different computer

Hi,





I am using keyword test recording to test my application and TestExecute to run
tested application on the different computers.






I am having problems that to start the .exe file (which is first test step) I
have given path of my local computer but when I use the same test case on the
different machine, my test case is become failed strait away (because of the
file path is not exits).





Also having same problem due to different resolution on the different computers
because TestComplete record steps based on the pixels.





How to specific the path (for example: start\computer\D:\Relese\app.exe) and
resolve pixels issues which runs application on the different environment.

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    What you might want to do is rethink your test design a little bit.  The file that you are using for your test, you might want to make sure exists on all testing environments in some sort of standardized path/location.  



    Secondly, rather than trying to access the file using Start button and other such things, there are other methods available for working with files.  You might want to look into aqFile, aqFileSystem and other such objects.



    Thirdly, while when you record tests in TestComplete it uses co-ordinates based upon pixels, this is not necessary for "Click" methods.  In scripts, if you call "Click" with no parameters or in keywords if you set the parameters to -1 for each, the "Click" method will click in the center of the designated object, regardless of screen resolution.



    Without further understanding of the specifics of your test, this is the best suggestions I can give.
  • nazz's avatar
    nazz
    Occasional Contributor

    Hi Robert,




    Thanks for your suggestions and it does work for both path and pixels issues.




    I am also wondering that is there any way to find out time interval betweeneach modules.




    For example click on any icon and how much time it consumes to pop up window on the screen?






    Thanks,

    Nazz









  • gentlesea's avatar
    gentlesea
    Frequent Contributor
    For dealing with timing issues there are the aqDateTime methods.

    You want to look at aqDateTime.TimeInterval.



    If it is about delaying the script execution until an element appears I suggest to do the following though:




    Aliases.YourButton.WaitProperty("VisibleOnScreen", true, -1);

    Aliases.YourButton.Click();