Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to record the Enter button that we use through key board
#1
Not Solved
Hi,
I need to test for web page which has Quick Search defaulted to some value. Now i must check when i click on enter it should stay in the same page.Now, when i am recording QTP is not identifying enter.So, how can i test this trrough automation.

Thanks
Ramakrishna
Reply
#2
Not Solved
Hi,
Use this script Enter button will be triggered wherever it is required.
Code:
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{ENTER} or ~"
Reply
#3
Not Solved
Hi Venkat,
Thanks for giving me immediate Reply. I used this Quote but it is not clicking Enter when this is Executed.

Thanks
Ramakrishna
Reply
#4
Not Solved
Code:
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{ENTER}"
or
WshShell.SendKeys "{~}"
Reply
#5
Not Solved
Hi,
I used the same code, but when i am executing the test it is not able to take Enter.Please some one help me..
Reply
#6
Not Solved
Ganta,
try this code below

Code:
Browser("browsername").page("pagename").Activate


Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{ENTER} or ~"
Reply
#7
Not Solved
Hi Selvam,
I used the above mentioned code,but i am getting an error Object doesnot support this property or method
Code:
Browser("browsername").page("pagename").Activate
when i am executing the test. So, this is also not working.
Reply
#8
Not Solved
Have you tried with the "DeviceReplay" ? There is a option called "presskey".
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to pass "Enter" Key through Sendkeys Lavanya N 1 4,134 07-24-2015, 02:17 PM
Last Post: Lavanya N
  How to enter values into excel which is already open using QTP Narayanan 1 4,370 12-11-2013, 07:30 AM
Last Post: basanth27
  Record and run differences on "button with context menu" cem404iuce 0 1,803 11-11-2013, 03:07 PM
Last Post: cem404iuce
  QTP key issue fix kprasadbio 1 3,138 05-04-2013, 10:47 AM
Last Post: Saket
Wink How to Enter A Value on Web Element pgcsc 2 3,718 02-14-2012, 02:08 AM
Last Post: pgcsc

Forum Jump:


Users browsing this thread: 2 Guest(s)