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
Can you paste whatever you have tried?
you can try using "FireEvent" Method.Check on which event the button is getting enabled and accordingly you can use appropriate event.
Example: Browser("name:=XYZ").Page("title:=XYZ").WebEdit("name:=ABC").FireEvent "onblur"
i tried all these but still no luck,i need something like keyup or typekeys,Help please
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
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.
Thank you so much, that worked.I tried send kys but i was activating the main window.which was a mistake
(03-10-2010 06:58 PM)tbull Wrote: [ -> ]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
*********************
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:
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
(03-10-2010 06:58 PM)tbull Wrote: [ -> ]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
*********************
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:
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