| || |
WinRunner Verifying Listbox item
Every thing was working in winrunner other than the Expected value for the Listbox control in the Visual basic.
i.e. WinRunner is not trapping the text in the listbox.
Below is the code.
=============================================Optio n Explicit
Dim mybutton As CommandButton
Private Sub cmdadd_Click()
Dim name As String
Static count As Integer
name = CStr(count)
List1.AddItem "Name" & count
count = count + 1
Now run the program.
Clicking the button will bring a "text Name0" in the list box.
Now to capture the name from winrunner, i selected the 'GetText from Object/Window'
and double clicked on the listbox.
It generated the code as mentioned below
obj_get_text("ThunderListBox", text); # Name0
but this code is not checking for the expected value.
Now alternatively i made a GUI check point for single property.
I changed the check attribute from 'enabled' to 'value'.
and gave the expected as "Name0"
and clicked the Paste button.
It added the following code.
but the test result FAILED. and is not capturing any value.
It is the same problem that we had faced that day. but was able to get out of it at that time.
and now i am in the same trap.
Can some one please try this and let me know.
Re: WinRunner Verifying Listbox item
Try this one:
The variable value must contain the text of the selected item after executing the instruction.
I hope it works...