Try :
row = checkbox_id.match(/\d\d/).to_i

On Sat, Jan 17, 2009 at 1:43 AM, aidy lewis <aidy.le...@googlemail.com>wrote:

>
> Hi,
>
> Has anyone had problems using a variable in the cell array?
>
>    checkbox_id =
> ingest.find_enabled_checkbox("Search_ItemDetail_SpoolGrid").id
>    row = checkbox_id.match(/\d\d/)
>    browser.table(:id, /Search_ItemDetail_SpoolGrid/)[row][3].text
>
> This is the stack trace
>
>  undefined method `-' for #<MatchData:0x6012f10> (NoMethodError)
>  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/table.rb:159:in
> `_row'
>  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/table.rb:99:in `[]'
>
>
> This will work the though
>
>  browser.table(:id, /Search_ItemDetail_SpoolGrid/)[15][3].text
>
> Aidy
>
> >
>


-- 
Thanks.
Wesley Chen.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to