ash110uce
ash110uce

Reputation: 21

I am running QTP test Scripts in one browser, but at the same time, I want to open the browser in another window and do something like checking mail.

I am running QTP test Scripts in one browser, but at the same time, I want to open the browser in another window and do something like checking mail, googling something then active mode or focus is coming to the current working window, not the automation test run browser sometimes.

Is it possible to work on the browser while automation test is run?

Upvotes: 1

Views: 1116

Answers (1)

AutomatedChaos
AutomatedChaos

Reputation: 7490

I strongly advice against. While QTP is able to do user actions by directly accessing methods on DOM objects like the click event on a button or setting the .value attribute on an editbox*, sometimes real interaction with the browser is necessary. And sometimes a test is executed with only real browser actions (this is set in the options menu). You'll notice this when your focus changes to the application under test.

Imagine what will happen with your test if you just finished a sentence in your mail, you press ENTER and just on that moment the focus changed to the application under test, activating an unwanted action. It will render this testcase useless.

It is better to have a dedicated machine for testing (and if you can pay the license fee for QTP, you can pay for an additional desktop) or have QTP running on a virtual machine, preferably running on a server.
You can use a remote desktop connection or tools like Synergy to interact with multiple machines from one keyboard / mouse combination without having the drawbacks of unintentional interaction.

*In contrary to moving the mouse cursor to the button an send a WM_LBUTTONDOWN / WM_LBUTTONUP message and moving the cursor to the editbox, send a click and sending a keystroke stream to the object.

Upvotes: 2

Related Questions