Hi All,Go to www.dhl..caSelect "Rate " and then select "Rate Calculator "input "E4V4T7" in Ship From Postal/Zip Code: fieldBrowser("Rates" ).Page("Rates" ).WebEdit( "WebEdit" ).Set "E4V4T7" The object repository can identify this object, but QTP cannot input "E4V4T7" in the Postal/Zip Code: field when I playbackCould you tell me why QTP cannot input value in this field?Thank you
P.S. This thread has been moved from Quality Center Support and News Forum to Unified Functional Testing (formerly QTP) News and Support Forum. -HP Forum Moderator
Go to Solution.
My application is a Siebel app. I am unable to set text using .set and also the below piece of code. pls help
Set ObjBroAdministration = Browser("brEPOSAdministration").Page("pgEPOSAdministration")Set WshShell = CreateObject("WScript.Shell")vname = "_id130:programid"ObjBroAdministration.WebEdit("name:="&vname).clickWshShell.SendKeys("E4V4T7")Set WshShell = NothingWait 2
Attached screenshot ofthe object hierarchy
Set ObjBroAdministration = Browser("brEPOSAdministration").Page("pgEPOSAdministration")Set WshShell = CreateObject("WScript.Shell")Set oWebEdit = Description.CreateoWebEdit("html tag").value= "INPUT"oWebEdit("name").value= ".*programid"ObjBroAdministration.WebEdit(oWebEdit).click 15.5WshShell.SendKeys("E4V4T7")Set WshShell = NothingWait 2
Reasons why there is failure when entering text in WebEdit.
1. There is a Sync Issue.
Data is entered even before the page is fully loaded (or) WebEdit field is refreshed based on another field & hence the data is wiped out on page/field load.
2. It's related to the Replay Type.
By default QTP/UFT uses the 'Event' replay type. When QTP sets the value with this replay type, it doesn't fire the associated events in the WebEdit.
Insert a Break point before & after the Set statement to see what's happening. Based on what you find, you could handle it using Sync statements or by changing the replay type.
Changing the replay type
'For Mouse Replay typeSetting.WebPackage("ReplayType")=2
'For Event Replay typeSetting.WebPackage("ReplayType")=1
If I used WShell script(Like as suggested in salved thread) for clearing the text, it is not working when system is locked.
Please suggest me how to overcome this problem.
Thanks in advance.