It's all about the answers!

Ask a question

When executing RFT script from RQM how to ensure application gets focus ?


Jennings Corley (622) | asked Jan 15 '14, 4:20 p.m.
 Specifically, when I run our RFT scripts from RFT the log in screen always appears with focus so that the script can successfully enter the credentials and log into the application.

However, when I run our scripts in the test suite of RQM the log in screen shows up on the tool bar as an icon unless i immediately minimize RQM after beginning execution.

The issue really becomes a problem when there is some issue in the middle of the run that causes RQM to lose focus.  When it tries to run the next script it cannot get focus on the log on screen and therefore fails to execute the test.

What I am looking for is if there is some setting or configuration within RQM that relates to this, or if there is a way within RFT that I can put a command in our log on script that gains focus before doing anything else.

I have tried using the activate method in RFT but that didn't work.

Suggestions ? 

Comments
Sunil Kumar R commented Jan 17 '14, 4:36 a.m.
JAZZ DEVELOPER
Hello! I understand that during the playback (from RQM using the RFT adapter) the login window (toolbar pop-up) affects the playback scenario.

Yes, .activate() was one option - does not help, probably because the pop-up window is within the page

Have you checked on why the login is expected during the playback? perhaps the session expires mid-way? other reasons?

Can you please elaborate the failure case (with snapshots if possible) to help understand the scenario better?

Best Regards, Sunil

Jennings Corley commented Jan 17 '14, 8:24 a.m.
Thanks for your reply. Our RFT automated scripts are testing our client side application. Each script represents a work flow of a user through a particular module of the application.  The first step in all of our scripts is logging into the application.  This is handled through a call to an RFT script which executes the application and contains the steps for entering user name and password credentials.Execution of our RFT scripts directly from RFT, no matter what I have up on the screen currently, the script successfully calls the application and the log on screen shows up on the screen as the active window so that the script can enter the credentials.However, when I run our scripts using a test suite from RQM, if I have any window up on the screen, for example the RQM suite execution progress screen, instead of the log on window showing up on the screen active and ready for input it shows up on the tool bar as a flashing icon. I believe the application is going to the screen but not being pulled to the front.






Jennings Corley commented Jan 17 '14, 8:25 a.m.

 if I run the suite and quickly minimize all open windows, the log on shows up on the screen and executes properly.

This workaround does allow me to start the suite execution successfully.  However, the problem happens when an unexpected error is encountered during execution.  If anything interrupts the flow of the script, the script fails (which is expected).  But when the suite attempts to start the next test case in the flow the log on script cannot gain focus to enter the log on credentials and one after another all remaining test cases fail to execute.

So the question I have is, why is my log on window not being brought to the front and given focus when I execute from RQM, but it does when I run directly from RFT.  Secondly, if there was a way to explicitly force the window to the front within my RFT script that might alleviate the problem because then  behavior should not be dependent on the source of the script execution.

Thanks in advance.  We have been using RFT for quite a while but are new to trying to put our build runs under the umbrella of RQM. 

One answer



permanent link
Subhajit Bhuiya (6222) | answered Jan 31 '14, 5:31 a.m.
JAZZ DEVELOPER
Please use Answer section to provide answer of the question instead of using comment on the question

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.