| || |
keystokes issue with VMs
I am working on a POC using QTP 11.0 trial version. Application is a windows application, developed using VB, Syncfusion controls.
Application and QTP are installed in virtual machines (VMs), accessed through client VPN.
For this application, i am passing keystrokes to work with menu items. Hence in a script i am passing the keystrokes repeatedly to perform menu actions. ex : Alt key and Control Key.
These scripts will run for longer duration ( 6 - 8 hrs) to test the same scenario with multiple set of data. ex: for 50 iterations, the same keystroke will be passed 100 times. During execution, in one or the other iteration, keystroke will not pass and hence the script execution fails.
Is this is a network issue, as i am working on VMs? What are all the possibilities for this missing passing keystrokes issue? Please share your experience on this issue.
What method are you using to send the keystrokes?
I worked on a VB app that the type/set operations never worked reliably in. The only way I could reliably enter data was to use SendKeys with a slight pause between each character. And even then I read the field after input to be sure it was entered properly to avoid automation errors.
No...Since both QTP and Application is installed in same machine there won't be a network latency, Perhaps you will consider below points
Originally Posted by AnitaShambhu
* Set the WSH to "nothing" end of each iteration
* Try adding wait statement between each step also help
I have used control and alt keys in the code. I have set to WSH to nothing and included wait as well. Below is the code.
Even after this keystrokes are not passed at one shot. Hence i have used DO UNTILL LOOP for now, to overcome this issue. It is working fine.
Public Function SendHotKeys(Keytopress)
Set WshShell = CreateObject("WScript.Shell")
Set WshShell = nothing