[ 
http://jira.openqa.org/browse/WTR-422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19659#action_19659
 ] 

Aliaksandr Palanetski commented on WTR-422:
-------------------------------------------

if <element1> is valid html element it can be identified using its inner text 
with xpath:

ole_el = browser.element_by_xpath('//*[contains(text(), "text1")]/')
\# html_el = Watir::Element.new ole_el



> Need a feature to identify unknown element using inner_text
> -----------------------------------------------------------
>
>                 Key: WTR-422
>                 URL: http://jira.openqa.org/browse/WTR-422
>             Project: Watir
>          Issue Type: New Feature
>          Components: HTML Controls
>    Affects Versions: 1.6.5
>         Environment: IE: Windows
>            Reporter: Nick Wayne
>            Priority: Major
>
> Hi,
> It would be really nice if a method is provided to identify any element using 
> inner_text. Right now one has to know the type of element one is looking for 
> to begin with. e.g. div or td or tr. But it is not possible to traverse back 
> from the inner_text and get the element.
> e.g. What I am asking for is :
> <element1> text1 </element1> 
> to be able to get <element1> by matching text1 even though I do not know what 
> is the type of <element1> is.
> Best regards,
> Nick

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.openqa.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to