I do not know the "for" attribute is used on tags except the LABEL tag.

On Friday, September 27, 2013 9:58:23 AM UTC-10, Asiq Ahamed wrote:
>
> Is it behaving only for Label tag?
>
> Sent on my BlackBerry® from Vodafone
> ------------------------------
> *From: * Wayne Hirata <[email protected] <javascript:>> 
> *Sender: * [email protected] <javascript:> 
> *Date: *Fri, 27 Sep 2013 12:51:45 -0700 (PDT)
> *To: *<[email protected] <javascript:>>
> *ReplyTo: * [email protected] <javascript:> 
> *Subject: *xpath LABEL[@for='aaa'] fails to recognize element
>
> I am using descriptive programming to find a LABEL by its "for" attribute.
>
> I am successful using xpath with the class attribute:
>   Browser().Page().WebElement("xpath:=//LABEL[@class='mytext']")
>
> Using the "for" attribute FAILS to identify the element.
>   Browser().Page().WebElement("xpath:=//LABEL[@for='mytext']")
>
> Here is the html: 
> <html>
> <head><title>qtp xpath test</title></head>
> <body>
>    <label for="mytext" class="mytext">Name:</label>
>    <input id="mytext" name="mytext" type="text">
> </body>
> </html>
>
> Is there a method to identify a LABEL element when the LABEL only has the 
> "for" attribute. My real life test case has only the "for" attribute. I 
> would like to validate the innertext property.
>
> -- 
> -- 
> 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]<javascript:>
> To unsubscribe from this group, send email to
> [email protected] <javascript:>
> 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] <javascript:>.
> 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.

Reply via email to