I need to move specific item from one weblist click on a button > to move it to the other weblist. This is a java heavy app. QTP does not recognize the items within the weblist. It recognizes the weblistbox but not the items within the box. I have tried using analog recording however, it is very undependable. Any suggestions, thoughts, questions, or answers?
Set the Web Event Recognition settings to high and the re-record the script...
I am also facing the same problem. I did try the Web Event recording Configuration. But still I didn't come up with the solution.
Can you respond in other way.
I guess ur trying to select/set the item in the weblist by specifying the item description. Y dont u try writing a function that reads each item in the weblist and match with wat ur trying to select in it. and wehn u find a match then set the index.hope that solves the prob.
"life is simple if you can see both sides of a coin" - by me
I recently created a function to select a weblist item by part of its item text (each item is dynamic and made up of various properties). It uses the all_items string property and Split to populate an array of selectable items - then uses the array index to select the weblist item by index.
It may or may not be of any help - code below:
' Function SelectByPartTxt
' Select the first matching list item by part of its text value
' Returns - Text of selected item - if the item exists
'@Description Selects an item in the list by part of its text value
'@Documentation Select item containing <strPartText> in the <Test object name>list
Public Function SelectByPartTxt(obj, strPartText)
Dim item_count, all_items, arrItems, name_property, selected_text, iSel
' Get the all items text property from the test object
all_items = obj.GetROProperty("all items")
arrItems = Split(all_items, ";")
name_property = obj.GetTOProperty("Name")
If InStr(all_items, strPartText) > 0 Then
' Get the item count property from the test object
item_count = obj.GetROProperty("items count")
'Select the item containing the partial string
For iSel = 0 to item_count - 1
If Instr(arrItems(iSel), strPartText) > 0 Then
obj.Select "#" & CStr(iSel)
selected_text = obj.GetROProperty("selection")
Reporter.ReportEvent micPass, "SelectByPartTxt Succeeded", "The item <" & selected_text & "> is selected"
SelectByPartTxt = selected_text
Reporter.ReportEvent micFail, "SelectByPartTxt Failed", "The text <" & strPartText & "> is NOT contained in any selectable item"
SelectByPartTxt = ""
' Register the "SelectByPartTxt" Function
RegisterUserFunc "WebList" , "SelectByPartTxt" , "SelectByPartTxt"
If you had to identify, in one word, the reason
why the human race has not achieved, and never
will achieve, its full potential that word would be "meetings".
Could you Please tell me what is analog Recording?I googled it but couldn't find the desired Results.
Dipika, there is something called QTP help...did you try that?