Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hitting enter key aftrer seting value in webedit
#1
Not Solved
i have a situation when a button is being enabled only if i type the keys in.but when the qtp set the value the button is not being enabled.so i want to hit enter after seting the value in webedit.help please? i tried sedn keys but it hitting enter on the page not in the webedit form
Reply
#2
Not Solved
Can you paste whatever you have tried?

Reply
#3
Not Solved
you can try using "FireEvent" Method.Check on which event the button is getting enabled and accordingly you can use appropriate event.

Example:
Code:
Browser("name:=XYZ").Page("title:=XYZ").WebEdit("name:=ABC").FireEvent "onblur"
Reply
#4
Not Solved
i tried all these but still no luck,i need something like keyup or typekeys,Help please

Code:
AMA.Link("name:=Intermodal Storage").Click
AMA.WebEdit("name:=equipmentIdList").Set "PACU 898375"
'Wait(3)
''AMA.WebButton("name:= Search").FireEvent "onblur"
'Wait(2)
'
''Dim WshShell
'''             set WshShell = CreateObject("WScript.Shell")
'''         wait(3)
'''         WshShell.AppActivate "name:=UP: Accessorial Management: Intermodal Storage"
'''         WshShell.SendKeys" {ENTER}  "
'''         wait(3)
'''        
'
''
'''AMA.WebEdit("name:=equipmentIdList").Type micF5
'''AMA.WebEdit("name:=equipmentIdList").SendKeys TE_ENTER
AMA.WebButton("name:= Search").Click
Reply
#5
Not Solved
i guess sendkeys should work here.
you just need to ativate the edit box by clicking there before sending the enter/tab.

I would prefer to send Tab key instead of Enter (if AUT permits)
try this

Code:
set WshShell = CreateObject("WScript.Shell")

AMA.WebEdit("name:=equipmentIdList").Set "PACU 898375"
AMA.WebEdit("name:=equipmentIdList").Click
WshShell.SendKeys"{TAB}"
'or try sending Enter as well
'WshShell.SendKeys"{ENTER}"

let me know if this helps.

Reply
#6
Not Solved
Thank you so much, that worked.I tried send kys but i was activating the main window.which was a mistake
Reply
#7
Not Solved Cool 
*********************
Hi,
'Send Keys', are very faster than other scripting logic, so before coming to the sendkeys we have to activate the particular object
For example:
Code:
Browser(BrName).Page(PgName).Frame(FrName).WebEdit(textboxName).Activate
then use the 'Enter' functionality SendKeys afterwards, even though if it's not working, just use the 'Enter' functionality SendKeys one more time, because sendkeys won't wait for screen/page loading, after using sendkeys method please use wait(2)

Note: To use the Fireevent method we have to activate the events before from "WebEvent Configuration Method" under the Tools menu
select the particular object and make enable the events you needed.

Regards,
Dhanavantha G Krishnan
Reply
#8
Not Solved Cool 
*********************
Hi,
'Send Keys', are very faster than other scripting logic, so before coming to the sendkeys we have to activate the particular object
For example:
Code:
Browser(BrName).Page(PgName).Frame(FrName).WebEdit(textboxName).Activate
then use the 'Enter' functionality SendKeys afterwards, even though if it's not working, just use the 'Enter' functionality SendKeys one more time, because sendkeys won't wait for screen/page loading, after using sendkeys method please use wait(2)

Note: To use the Fireevent method we have to activate the events before from "WebEvent Configuration Method" under the Tools menu
select the particular object and make enable the events you needed.

Regards,
Dhanavantha G Krishnan
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to pass "Enter" Key through Sendkeys Lavanya N 1 3,914 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,190 12-11-2013, 07:30 AM
Last Post: basanth27
  QTP key issue fix kprasadbio 1 3,048 05-04-2013, 10:47 AM
Last Post: Saket
Wink How to Enter A Value on Web Element pgcsc 2 3,591 02-14-2012, 02:08 AM
Last Post: pgcsc
Toungue Enter new value from datatable in web edit sonali shinde 4 7,048 01-21-2012, 11:04 AM
Last Post: sonali shinde

Forum Jump:


Users browsing this thread: 1 Guest(s)