Hello depak:

I have something similar in that I have a webEdit which appears to be
a weblist (dropdown list).  The webEdit has a down arrow associated
with it. (Actually I had four of these webedit fields on one web
page.)

What I had to do was the following.  The "select_field" is the down
arrow that occurs along side the webEdit field.

Function someName

        Set obj = Browser(bro).Page(pg).webElement("Select_field").Object
        Set dr = CreateObject("Mercury.DeviceReplay")
        Set wshShell = CreateObject("WScript.Shell")

        ' first activate the drop down list and then put the cursor into the 
edit field
        obj.focus
        obj.click

        ' Put the cursor in the webedit field
        ' you will have find your own corrdinates
        dr.MouseClick 316,320,LEFT_MOUSE_BUTTON

        wait(2)
        wshShell.SendKeys"{DOWN}"

        Call FindItemInList ("webEdit_name","name want to select")
        
                    ' the sub should have selected the value wanted in the list
        ' so I am just going to verify
        var = 
Browser(bro").Page(pd).WebEdit("webEdit_name").GetROProperty("value")
        print "selected the value = " & var
        Set obj = Nothing
        Set wshShell = Nothing
        Set dr = Nothing
        wait(1)
End Function


sub FindItemInList (listName,tofind)
   Dim wshShell, flag, var, s, i
   Set wshShell = CreateObject("WScript.Shell")
        flag = ""
'       s = ""
        Do until flag = "stop"
                wshShell.SendKeys"{DOWN}"
                var = 
Browser(bro).Page(pg).WebEdit(listName).GetROProperty("value")
'               s = s & vbcrlf & var
                i = i + 1
                If i = 30 Then          '  some number to make certain an 
infinite loop cannot happen
                        flag = "stop"
                End If
                If Trim(var) =Trim(tofind) Then
                        flag = "stop"
                        wshShell.SendKeys "{ENTER}"
                End If
        
        Loop
'       msgbox s
        Set wshShell = Nothing
End Sub

hth,

Parke

On 7/12/12, santhosh kumar <[email protected]> wrote:
>
>    Hi depak/KK
>
>    I am also facing same issue as you mentioned ...
> In my application WebList is identified as Weblement .... I also tried what
>
> i had tried tried to accses list object and listitem object as WebElements
> but of no use.
> Please Let me know if you find any solution ... its Urgent for me ....
>
> On Friday, March 16, 2012 6:15:24 PM UTC+5:30, Deepak wrote:
>>
>> Hi All,
>> In my application, a weblist is identified as webelement and all the list
>>
>> items also. i use webelement("").click two times for the list once and for
>>
>> the list item once. For the list it works fine but it can't identify the
>> object for list item. i tried DP also.the object can be identified by
>> object spy . Can anyone suggest any solution
>>
>> Thanks In Advance
>>
>> Regards,
>> Deepak
>>
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>


-- 
Parke
Cell: 770-842-0121

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to