Re: [Wtr-general] Access all elements in a form

2007-04-06 Thread Željko Filipin

Hi Sayali,

I got lost. I did not understand what do you want to do. You can not set one
radio button?

Regarding your original post, this is how you can flash all radio buttons in
a form.

ie.form(:index, 1).radios.each { |radio| radio.flash }

Zeljko
--
ZeljkoFilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Access all elements in a form

2007-04-06 Thread Sayali Patil

Hi Zeljko,
Here is the html that is generated,





one two

 

 aa
 bb
 cc



 two three




 aa
 bb
 cc



 two three



In this case the parId0 parameter name is repeated twice in the same code.
Once it is displayed as individual radio buttons and once it is displayed in
the form of nested,
so when i select the parId0 from the individual parId0 the same radio button
gets selected
in the nested one .


The Watir code i m using is

   $ie.radio(:name,"parId0",0).set
  assert($ie.form(:index ,6).radio(:name , "parId0",0).isSet?)


  $ie.radio(:name,"parId0",1).set
  assert($ie.form(:index ,6).radio(:name , "parId0",1).isSet?)

the error i m getting when i run this code is

1) Error:
test_cxipvar(TC_CxIpVar):
Watir::Exception::UnknownObjectException: Unable to locate object, using
name and parId0
   c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:2416:in
`assert_exists'
   c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:4149:in
`isSet?'

Please go through the above and let me know how can i code in watir the
right way
for this.

Thanks,
Sayali



On 4/6/07, Željko Filipin <[EMAIL PROTECTED]> wrote:


Hi Sayali,

Can you post html of that form, your watir code, and error message?

Zeljko
--
ZeljkoFilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Access all elements in a form

2007-04-06 Thread Željko Filipin

Hi Sayali,

Can you post html of that form, your watir code, and error message?

Zeljko
--
ZeljkoFilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Access all elements in a form

2007-04-05 Thread Sayali Patil

Hi Charley,
I can access a single element in the form.
What i want is i should be able to access all the elements in a form with a
loop .
Actually i have nested forms and i m not able to access each element
individually ,so i want to
try n access all the elements and further do the operations .
My scenario si something like this



1


2



now i m able to access the radio button 1 but when i try to access radio
button 2 i get an error
saying cannot find.

Please help me out .


Thanks,
Sayali



On 4/6/07, Charley Baker <[EMAIL PROTECTED]> wrote:


Something like this:

$ie.form(:name,'myform').button(:value, 'Submit').click

You can take a look at the unittests for watir in form_test.rb, there are
plenty of examples there.

-Charley


 On 4/5/07, Sayali Patil <[EMAIL PROTECTED]> wrote:

>  Hi All,
> How to access all the elements in a particular  ,in an html
> document using watir?
> Please let me know.
> Thanks,
> Sayali
>
> ___
> Wtr-general mailing list
> Wtr-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>


___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Access all elements in a form

2007-04-05 Thread Charley Baker

Something like this:

$ie.form(:name,'myform').button(:value, 'Submit').click

You can take a look at the unittests for watir in form_test.rb, there are
plenty of examples there.

-Charley


On 4/5/07, Sayali Patil <[EMAIL PROTECTED]> wrote:


Hi All,
How to access all the elements in a particular  ,in an html document
using watir?
Please let me know.
Thanks,
Sayali

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] Access all elements in a form

2007-04-05 Thread Sayali Patil

Hi All,
How to access all the elements in a particular  ,in an html document
using watir?
Please let me know.
Thanks,
Sayali
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general