Hi Trinath,
This should work for your requirement.
'Create description object for Listbox
Set Odesc1=Description.Create
Odesc1("micclass").value="WebList"
Odesc1("name").value="NameofDropDown"
'Create description object for textbox
Set Odesc2=Description.Create
Odesc2("micclass").value="WebEdit"
Odesc2("name").value="NameofTxtBox"
'Get the childobjectCount
Set ChildListObj=Browser("BrwName").Page("PgName").ChildObjects(Odesc1)
Set ChildTxtObj=Browser("BrwName").Page("PgName").ChildObjects(Odesc2)
If ChildListObj.count=1Then
intListItmcnt=ChildListObj(0).GetROProperty("itemscount")
For intRow=1 to intListItmcnt
'selecting a value in the List box
ChildListObj(0).select "#"&intRow
strListboxVal=ChildListObj(0).GetROProperty("value")
strTxtboxVal=ChildTxtObj(0).GetROProperty("value")
If Trim(strListboxVal)= Trim(strTxtboxVal) Then
Print "Pass"
Else
Print "Fail"
End If
Next
Elseif ChildListObj.count=0
Print "Object is not available in the application"
Elseif ChildListObj.count>1
Print "More than one Object is available in the application"
End If
Regards
Shiva
On Tue, Mar 26, 2013 at 10:33 PM, Thrinath <[email protected]> wrote:
>
> Hi,
>
> I would like to write script (Descriptive Programing, Web Application) for
> following scenario
>
> 1) There is a drop down, which having values 1 to N
> 2) Beside this drop down, one more text box is there.
> 3) When user select value in drop down, same value should appear in text box
> Ex: If user select value 5 in drop down, text box should display the
> value 5.
> Note: I need to verify this validation working on not?
>
> Regards,
> Thrinath
>
> --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups
> "QTP - HP Quick Test Professional - Automated Software Testing" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
--
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
---
You received this message because you are subscribed to the Google Groups "QTP
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.