0

I am working on QTP 11. I my current project I am trying to automate a website with AJAX fields. I my project I have a text field on which if we try to enter characters then AJAX table appears and we have select a suitable value from the below table. I am able to check the existence of AJAX table. The problem is to set the text field through QTP, AJAX is not getting invoked. But manually it is working properly. Also, if I first try manually and then I try to enter any through the script, then also it is working properly. It is not possible for me to check each field manually then enter it through script. So can any body tell how AJAX can be invoked on first try without any manual intervention? I have tried to Set property, Keyboard events like WScript.shell, Mercury.DeviceReplay and AutoIt, however none of them are working. Are there any keyboard input methods that I have missed out? Can somebody please help me out?

2 Answers2

0

Try performing a WebEdit.Click on the text field in question. If this doesn't work it means that the web page is expecting some events that QTP didn't fire in this case you should change to device replay mode

Setting.WebPackage("ReplayType") = 2
Browser(...).Page(...).WebEdit(...).Click
Setting.WebPackage("ReplayType") = 1
Motti
  • 110,860
  • 49
  • 189
  • 262
  • Motti I have tried the click method but it was not working. Now i have tried the above method told by you , but it is still not working. Same problem persits. I have also tried some different FireEvents but those are also not working. Is there any other way? – Ankit Kapadia Jan 07 '13 at 16:14
  • @AnkitKapadia, I can't think of another way, sorry. – Motti Jan 07 '13 at 19:17
-1

I had the same issue, not recognizing the web list (not selecting the item from list). Using QTP 11.5 loaded with web toolkit 2.0, ASPAjax, DOJO, JQuery add-ins. Still showing the same behavior. However there is nothing wrong with the code, if I give some wait the code is working OK.