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

Jari Bakken commented on WTR-435:
---------------------------------

I like this change. It's already been suggested in the Celerity tracker [1] and 
does won't break existing code (since the current behavior is to raise an 
ArgumentError if no arguments are given)

[1] http://github.com/jarib/celerity/issues#issue/7



> Default locator for all elements should be :index => 1
> ------------------------------------------------------
>
>                 Key: WTR-435
>                 URL: http://jira.openqa.org/browse/WTR-435
>             Project: Watir
>          Issue Type: New Feature
>          Components: Other
>    Affects Versions: 2.0
>         Environment: any
>            Reporter: Jarmo Pertman
>
> I'm finding myself very often clicking links on the table with random
> identifiers. Consider a table like this:
> <table id="table_id">
>  <tr>
>   <td>Something</td>
>   <td><a href="#" onclick=delete(somerandomid)>Delete</a></td>
>  </tr>
>  <tr>
>   <td>Something else</td>
>   <td><a href="#" onclick=delete(somerandomid)>Delete</a></td>
>  </tr>
> </table>
> Now, if i want to delete "Something else", then
> currently i have to do something like this:
> product = b.table(:id => "table_id").rows.find {|row| row.text ==
> "Something else"}
> product.link(:index => 1).click
> With my proposal it would be like this:
> product = b.table(:id => "table_id").rows.find {|row| row.text ==
> "Something else"}
> product.link.click

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