Hi ,
Try this function it may resolve the problem
*TO Call the function:*
PageObj=Broswer().Page()
objectname="WebEdit" 'Specify the webedit name
PropValue= "" 'value to be seletced from the list
Call SelectItem(PageObj,objectname,PropValue)
*Function to written to select *:
Function SelectItem(PageObj, objectname,PropValue)
' Get the default value in the combo box
Defaultvalue=Trim(PageObj.WebEdit("name:="&
objectname).GetROProperty("value"))
' validate is the default value is what we want to select
If (Strcomp(Defaultvalue,PropValue,1)=0) Then
SelectItem=True
Else ' if default value is not the one we dont want to select then
only go for following code
PageObj.WebEdit("name:="& objectname).Click
On error resume next
If PageObj.webelement("innertext:="&PropValue).Exist then
' search in the displayed list we have expected item to select
PageObj.webelement("innertext:="&PropValue).click
SelectItem=True ' Return value
Else
SelectItem=False
End
if
End If
End Function
On Wed, Dec 9, 2009 at 3:10 PM, Daim <[email protected]> wrote:
> Property Name and their values for WebElement
>
> innertext = High
> outertext = High
> Class Name = WebElement
> class = x-combo-list-item
> html tag = DIV
>
> The values for other WebElement is same except for the innertext.
>
>
> --
> 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]<mercuryqtp%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>
--
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