'Problem: Sometimes it happened that QTP is not recognizing the objects. Can i use keyboard strokes to click any of the link and Navigate the different parts of open application.
'Solution:
'Use of KeyStroke on Active Browser/Window
Set Obj=CreateObject("WScript. Shell")
wait 2
Obj.Run "http://www.google.com"
wait 2
Obj.SendKeys "{Enter}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Enter}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Enter}"
wait 2
Obj.Run "http://www.google.com"
wait 2
Obj.SendKeys "{Enter}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Enter}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Tab}"
wait 2
Obj.SendKeys "{Enter}"
'The above code will
1. Launch "Google.com"
2. Click on link "Advanced Search"
3. Click on link "Google Instant" within Advanced Search Page
1. Launch "Google.com"
2. Click on link "Advanced Search"
3. Click on link "Google Instant" within Advanced Search Page
I have java application, I need to test object with tab/enter. I have to focus object and move with "shift"+"tab" and then "tab" to focus the object for pressing the "enter".
ReplyDeleteMy code works fine but with a loop its stuck doing the Tab/Enter. I tried with object.refresh/wait time/WaitProperty/sync while moving the next object but nothing makes work properly. If I have 60 iterations, there are 2/3 will miss. Is there any solution? Please.
SWIFT Interview questions on
ReplyDeletehttp://testwithus.blogspot.in/p/swift.htm
For selenium solution visit
http://testwithus.blogspot.in/p/blog-page.html
QTP Interview Questions.
SWIFT Interview questions on
ReplyDeletehttp://testwithus.blogspot.in/p/swift.htm
For selenium solution visit
http://testwithus.blogspot.in/p/blog-page.html
QTP Interview Questions.
http://testwithus.blogspot.in/p/qtp-questions.html
Thanks for your informative article!! Your article on using key strokes will help students and testing professionals to solve the complications.
ReplyDeleteqtp training chennai