[wtr-general] Re: Need help checking a box in a table in an iframe

2009-09-28 Thread Željko Filipin
On Fri, Sep 25, 2009 at 7:40 PM, rollo  wrote:
> I'll revisit the
> xpath option, though it didn't work when i tried initially and I don't
> believe its supported for frames/iframes, which is where this table
> lives.

You can not select a frame using xpath, something like this:

browser.frame(:path, "xpath)

but you can select element in a frame using xpath, something like this:

browser:frame(:id, "id").link(:xpath, "xpath)

Željko

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



[wtr-general] Re: Need help checking a box in a table in an iframe

2009-09-25 Thread rollo

Greetings.  desiring to make the question more coherent, I left out
the fact that there are 4 accounts that only differ in the Text
attribute.  In addition, the accounts are non-consecutive and the
order is arbitrary.  So, while :index would work on this specific
dataset, I can't be guaranteed that the order/number of email accounts
remains the same.  To get through the current sprint, I chose a brute
force method (select all addresses), which also covers a secondary
issue I'm testing.  So, I've a solution for now.  I'll revisit the
xpath option, though it didn't work when i tried initially and I don't
believe its supported for frames/iframes, which is where this table
lives.

If anyone has additional solutions, I'd be happy to try and report
back.

Thanks.

On Sep 25, 12:41 am, Željko Filipin 
wrote:
> This clicked the second chckbox for me:
>
> browser.frame(:name,/admin_frame_*/).checkbox(:name=>"email", :value=>"
> cro...@point.com", :index=> 2).set
>
> http://wiki.openqa.org/display/WTR/Multiple+Attributes
>
> Željko
> --http://watirpodcast.com/
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[wtr-general] Re: Need help checking a box in a table in an iframe

2009-09-25 Thread Željko Filipin
This clicked the second chckbox for me:

browser.frame(:name,/admin_frame_*/).checkbox(:name=>"email", :value=>"
cro...@point.com", :index=> 2).set

http://wiki.openqa.org/display/WTR/Multiple+Attributes

Željko
--
http://watirpodcast.com/

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



[wtr-general] Re: Need help checking a box in a table in an iframe

2009-09-25 Thread Ankur Gera
Hi Rollo,

In these kind of situations you can use xpath also bcz there can any number
of elements whose html will seems to be similar.

Thanks & Regards,
Ankur Gera

>
>

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



[wtr-general] Re: Need help checking a box in a table in an iframe

2009-09-24 Thread rollo

I should add that I know the text is on the page...

irb(main):059:0> browser.frame(:name,/
admin_frame_*/).text.include?'rollo, c j'
=> true

Thanks.
On Sep 24, 11:00 pm, rollo  wrote:
> I'm in need of some help getting to a checkbox element in a table (in
> an iframe).  My trouble is that there are two check box elements that
> are almost exactly the same.
>
> Here is the HTML:
>
>    rollo, 
> c (cro...@point.com)
>
>   
> > rollo, c j (cro...@point.com)
>
> Here is code that checks the first box:
>
>         browser.frame(:name,/admin_frame_*/).checkbox
> (:name=>"email",:value=>"cro...@point.com").set
>
> For the life of me, I can't get to the second check box.  I've tried
> various things, including xpath and regex to isolate on the text but
> its not coming clear.  Just lots of "Unable to locate element"
> results.  Any suggestions?
>
> Cheers.
> ~rollo
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---