Вопрос

Hi I have created a new script in IBM RFT in .net script 2005. The script is very slow. Please advice what should be done.

Here is an example of slowness:

ApplicationMenuBar().Click(AtPath("File->Open..."))
OpenWindow().InputChars("C:\Test\new.txt")
OpenButton().Click(AtPoint(30, 9))

This code is used to open file and then input character and then clicked open button. This all process takes 1.5 minutes of time.

Please suggest. Examples will be appreciated

Это было полезно?

Решение

I can't be sure, but your behaviour looks like RFT has some difficulties to find the objects to interact with. Probably your recognition score is quite low, and RFT waits for a lower score objects before interacting (lower score = object is similar to the one requested).

Take a look at this short intro to Script Assure technology. Then manually set your recognition properties using a Regular Expression. This way your objects will be recognized immediately without the need of a wait. Probably some id is changing between each run of the application under test.

Другие советы

Please ensure that 1) Your application under test is enabled for testing by RFT, 2) The logs and traces are not on, 3) Simplified Scripting is disabled .

Also which version of RFT are you using ? And any details about the AUT ( Application Under Test).

The Application appears to be .net/windows application. The actions you have recorded are fundamental actions and there is no optimization that you should have to do to make it fast. You have recorded three operations:

    Click a  menu item file->open
    On the opened window type some text
    Click a button 

Could you check which action is taking how long to perform, using the TimerStart() api? Something like below

TimerStart("MenuClick")   
ApplicationMenuBar().Click(AtPath("File->Open..."))
TimerStop("MenuClick")
TimerStart("InputChars")
OpenWindow().InputChars("C:\Test\new.txt")
TimerStop("InputChars")
TimerStart("Click Button")
OpenButton().Click(AtPoint(30, 9))
TimerStop("Click Button")

how much time each timer takes will be shown in the playback log file after the script is run. Also do you remember Enabling the logging and Tracing in RFT Preferences (its available in the eclipse IDE) , that could make things slow and you should turn tracing off if its enabled. As @Archiekins has mentioned , what version of RFT and what kind of AUT (and if its 32 bit/64 bit) would help. As the application appears to be .Net /Win you need not bother about Enabling the application.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top