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]
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.