I am having one heck of a time getting QTP to play fair with these Telerik controls. The most recent issue, being able to Set a value in an edit. I can set the value using extra code but for some reason, when a search is invoked, it ignores the entered value and performs an open search. Here's the QTP code including all the code lines that won't work :(.
Why in the world would QTP be able to see a value in the edit, but the value is ignored when the search is invoked? It's not a problem with the search itself as it works if I manually enter my filter into the edit. I am also including the source from the edit in question in case that might help...
Thanks in advance,
Cathy
'Enter Branch Office name for LookUp
'''vSearchedit = "name:=ctl00\$c\$NameTextBox Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).Click Wait 1 'Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).Set brNameIn 'Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).Type brNameIn 'Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).Object.Value = brNameIn 'Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).Object.Click' ''''have to use this ReplayType technique gotta love telerik
Setting.WebPackage("ReplayType") = 2 Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).set brNameIn Setting.WebPackage("ReplayType") = 1 Wait 1 Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).Click Wait 1 didSet = Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).GetROProperty("value") If didSet <> "" Then Wait 1 'Press the Search button Browser(vBrowser).Page(vPage).WebButton("name:=Search").Click Else Reporter.ReportEvent micFail, "Set Entity Search", "Unable to set the search value. Check your code!!!!" ExitTestIteration End IfWhy in the world would QTP be able to see a value in the edit, but the value is ignored when the search is invoked? It's not a problem with the search itself as it works if I manually enter my filter into the edit. I am also including the source from the edit in question in case that might help...
<span class="riSingle RadInput RadInput_Office2007" id="ctl00_c_NameTextBox_wrapper" style="width: 180px;"><input name="ctl00$c$NameTextBox" tabIndex="2" class="riTextBox riEnabled" id="ctl00_c_NameTextBox" style="width: 165px;" type="text" size="20" _events="[object Object]" control="[object Object]" RadInputValidationValue="" /><input name="ctl00_c_NameTextBox_ClientState" id="ctl00_c_NameTextBox_ClientState" type="hidden" autocomplete="off" value='{"enabled":true,"emptyMessage":"","validationText":"","valueAsString":""}' /></span>Thanks in advance,
Cathy