Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-25 Thread Alberto Magalhaes
thanks it's working!!

On Tue, Nov 25, 2014 at 2:46 PM, Justin Ko  wrote:

> It looks like there is sometimes a delay in the loading of the iframe
> containing the password field. Adding a wait to the setting of the password
> field solved the problem (at least for me):
>
> browser.iframe(id: "ws").text_field(id:
> "claveConsultiva").when_present.set 'bar'
>
> The `when_present` method tells Watir to wait for the element to appear
> before setting it.
>
> - Justin Ko
>
>
> On Monday, November 24, 2014 5:49:02 PM UTC-5, Alberto Magalhães wrote:
>>
>> same error :-(
>>
>> require 'watir-webdriver'
>> browser = Watir::Browser.new :chrome
>> browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html";)
>> #substituir o USERID pelo user de acesso
>> browser.text_field(:name => "usr").set "foo"
>> browser.button(:value => "Login").click
>> #browser.goto 'https://www.particulares.santandertotta.pt/pagina/
>> indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador'
>> browser.iframe(id: "ws").text_field(id: "claveConsultiva").set 'bar'
>> browser.iframe(id: "ws").link(id: "login_button").click
>>
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/
>> lib/watir-webdriver/elements/iframe.rb:10:in `locate': unable to locate
>> iframe using {:id=>"ws", :tag_name=>"iframe"} (Watir::Exception::
>> UnknownFrameException)
>> from C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/
>> lib/watir-webdriver/elements/element.rb:510:in `assert_exists'
>> from C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/
>> lib/watir-webdriver/elements/iframe.rb:31:in `assert_exists'
>> from C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/
>> lib/watir-webdriver/elements/element.rb:532:in `locate'
>> from C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/
>> lib/watir-webdriver/elements/element.rb:510:in `assert_exists'
>> from C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/
>> lib/watir-webdriver/user_editable.rb:11:in `set'
>> from teste_2.rb:8:in `'
>>
>>
>>
>> On Mon, Nov 24, 2014 at 10:44 PM, Titus Fortner 
>> wrote:
>>
>>> I take that back, I had a typo when trying to set. I'm not having any
>>> problem with the code...
>>>
>>> 2.1.2 :073 > browser = Watir::Browser.new :chrome
>>>  => #
>>> 2.1.2 :074 > browser.goto("https://www.santandertotta.pt/pt_PT/
>>> Particulares.html")
>>>  => "https://www.santandertotta.pt/pt_PT/Particulares.html";
>>> 2.1.2 :075 > browser.text_field(:name => "usr").set "foo"
>>>  => nil
>>> 2.1.2 :076 > browser.button(value: 'Login').click
>>>  => []
>>> 2.1.2 :077 > browser.iframe(id: 'ws').text_field(id:
>>> 'claveConsultiva').set 'bar'
>>>  => nil
>>> 2.1.2 :078 > browser.iframe(id: 'ws').link(id: 'login_button').click
>>>  => []
>>> 2.1.2 :079 >
>>>
>>>
>>> On Mon, Nov 24, 2014 at 4:36 PM, Alberto Magalhaes 
>>> wrote:
>>>
 Joe,
 Line 10. thanks

 On Mon, Nov 24, 2014 at 10:35 PM, Alberto Magalhaes <
 aacmag...@gmail.com> wrote:

> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/
> lib/watir-webdriver/elements/iframe.rb:10:in `locate': unable to
> locate iframe using {:id=>"ws", :tag_name=>"iframe"} (Watir::Exception::
> UnknownFrameException)
> from C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/
> lib/watir-webdriver/elements/element.rb:510:in `assert_exists'
> from C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/
> lib/watir-webdriver/elements/iframe.rb:31:in `assert_exists'
> from C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/
> lib/watir-webdriver/elements/element.rb:532:in `locate'
> from C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/
> lib/watir-webdriver/elements/element.rb:510:in `assert_exists'
> from C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/
> lib/watir-webdriver/user_editable.rb:11:in `set'
> from teste_2.rb:8:in `'
> >Exit code: 1
>
> On Mon, Nov 24, 2014 at 10:30 PM, Joe Fleck 
> wrote:
>
>> Alberto,
>>
>> What line is this failing on?
>>
>> Joe
>>
>> On Mon, Nov 24, 2014 at 5:26 PM, Alberto Magalhaes <
>> aacmag...@gmail.com> wrote:
>>
>>> Titus,
>>>
>>> I'm trying this:
>>> require 'watir-webdriver'
>>> browser = Watir::Browser.new :chrome
>>> browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html
>>> ")
>>> browser.text_field(:name => "usr").set "foo"
>>> browser.button(:value => "Login").click
>>> usr=Nome%20de%20Utilizador'
>>> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'bar'
>>> browser.iframe(id: 'ws').link(id: 'login_button').click
>>>
>>>
>>> On Mon, Nov 24, 2014 at 9:36 PM, Titus Fortner 
>>> wrote:
>>>
 This works for me.

 browser = Watir::Browser.new :chrome
 browser.goto 'https://www.particulares.santandertotta.pt/pagina/
 indice/0,,276_1_2,00.html?usr=Nome%20de%20Utiliz

Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-25 Thread Justin Ko
It looks like there is sometimes a delay in the loading of the iframe 
containing the password field. Adding a wait to the setting of the password 
field solved the problem (at least for me):

browser.iframe(id: "ws").text_field(id: "claveConsultiva").when_present.set 
'bar'

The `when_present` method tells Watir to wait for the element to appear 
before setting it.

- Justin Ko


On Monday, November 24, 2014 5:49:02 PM UTC-5, Alberto Magalhães wrote:
>
> same error :-(
>
> require 'watir-webdriver'
> browser = Watir::Browser.new :chrome
> browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html";)
> #substituir o USERID pelo user de acesso
> browser.text_field(:name => "usr").set "foo"
> browser.button(:value => "Login").click
> #browser.goto '
> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
> '
> browser.iframe(id: "ws").text_field(id: "claveConsultiva").set 'bar'
> browser.iframe(id: "ws").link(id: "login_button").click
>
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:10:in
>  
> `locate': unable to locate iframe using {:id=>"ws", :tag_name=>"iframe"} 
> (Watir::Exception::UnknownFrameException)
> from 
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
>  
> `assert_exists'
> from 
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:31:in
>  
> `assert_exists'
> from 
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:532:in
>  
> `locate'
> from 
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
>  
> `assert_exists'
> from 
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/user_editable.rb:11:in
>  
> `set'
> from teste_2.rb:8:in `'
>
>
>
> On Mon, Nov 24, 2014 at 10:44 PM, Titus Fortner  > wrote:
>
>> I take that back, I had a typo when trying to set. I'm not having any 
>> problem with the code...
>>
>> 2.1.2 :073 > browser = Watir::Browser.new :chrome
>>  => # 
>> 2.1.2 :074 > browser.goto("
>> https://www.santandertotta.pt/pt_PT/Particulares.html";)
>>  => "https://www.santandertotta.pt/pt_PT/Particulares.html"; 
>> 2.1.2 :075 > browser.text_field(:name => "usr").set "foo"
>>  => nil 
>> 2.1.2 :076 > browser.button(value: 'Login').click
>>  => [] 
>> 2.1.2 :077 > browser.iframe(id: 'ws').text_field(id: 
>> 'claveConsultiva').set 'bar'
>>  => nil 
>> 2.1.2 :078 > browser.iframe(id: 'ws').link(id: 'login_button').click
>>  => [] 
>> 2.1.2 :079 > 
>>
>>
>> On Mon, Nov 24, 2014 at 4:36 PM, Alberto Magalhaes > > wrote:
>>
>>> Joe,
>>> Line 10. thanks
>>>
>>> On Mon, Nov 24, 2014 at 10:35 PM, Alberto Magalhaes >> > wrote:
>>>
 C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:10:in
  
 `locate': unable to locate iframe using {:id=>"ws", :tag_name=>"iframe"} 
 (Watir::Exception::UnknownFrameException)
 from 
 C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
  
 `assert_exists'
 from 
 C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:31:in
  
 `assert_exists'
 from 
 C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:532:in
  
 `locate'
 from 
 C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
  
 `assert_exists'
 from 
 C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/user_editable.rb:11:in
  
 `set'
 from teste_2.rb:8:in `'
 >Exit code: 1

 On Mon, Nov 24, 2014 at 10:30 PM, Joe Fleck >>> > wrote:

> Alberto,
>
> What line is this failing on?
>
> Joe
>
> On Mon, Nov 24, 2014 at 5:26 PM, Alberto Magalhaes <
> aacmag...@gmail.com > wrote:
>
>> Titus,
>>
>> I'm trying this:
>> require 'watir-webdriver'
>> browser = Watir::Browser.new :chrome
>> browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html";)
>> browser.text_field(:name => "usr").set "foo"
>> browser.button(:value => "Login").click
>> usr=Nome%20de%20Utilizador'
>> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'bar'
>> browser.iframe(id: 'ws').link(id: 'login_button').click
>>
>>
>> On Mon, Nov 24, 2014 at 9:36 PM, Titus Fortner > > wrote:
>>
>>> This works for me.
>>>
>>> browser = Watir::Browser.new :chrome
>>> browser.goto '
>>> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
>>> '
>>> browser.iframe(id: 'ws').text_field(id: 'identificacionUsuario').set 
>>> 'Foo'
>>> browser.iframe(id

Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Titus Fortner
Are you using watir-classic or watir-webdriver?

If watir-webdriver, switch to this gem:
https://rubygems.org/gems/watir-webdriver



On Mon, Nov 24, 2014 at 4:54 PM, Alberto Magalhaes 
wrote:

> ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]
> Watir 5.0
> Google Chrome Version 39.0.2171.65
>
> On Mon, Nov 24, 2014 at 10:50 PM, Titus Fortner 
> wrote:
>
>> What version Watir, Chrome & ChromeDriver? Does it work in Firefox?
>>
>> On Mon, Nov 24, 2014 at 4:48 PM, Alberto Magalhaes <
>> aacmagalh...@gmail.com> wrote:
>>
>>> same error :-(
>>>
>>> require 'watir-webdriver'
>>> browser = Watir::Browser.new :chrome
>>> browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html";)
>>> #substituir o USERID pelo user de acesso
>>> browser.text_field(:name => "usr").set "foo"
>>> browser.button(:value => "Login").click
>>> #browser.goto '
>>> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
>>> '
>>> browser.iframe(id: "ws").text_field(id: "claveConsultiva").set 'bar'
>>> browser.iframe(id: "ws").link(id: "login_button").click
>>>
>>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:10:in
>>> `locate': unable to locate iframe using {:id=>"ws", :tag_name=>"iframe"}
>>> (Watir::Exception::UnknownFrameException)
>>> from
>>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
>>> `assert_exists'
>>> from
>>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:31:in
>>> `assert_exists'
>>> from
>>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:532:in
>>> `locate'
>>> from
>>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
>>> `assert_exists'
>>> from
>>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/user_editable.rb:11:in
>>> `set'
>>> from teste_2.rb:8:in `'
>>>
>>>
>>>
>>> On Mon, Nov 24, 2014 at 10:44 PM, Titus Fortner 
>>> wrote:
>>>
 I take that back, I had a typo when trying to set. I'm not having any
 problem with the code...

 2.1.2 :073 > browser = Watir::Browser.new :chrome
  => #
 2.1.2 :074 > browser.goto("
 https://www.santandertotta.pt/pt_PT/Particulares.html";)
  => "https://www.santandertotta.pt/pt_PT/Particulares.html";
 2.1.2 :075 > browser.text_field(:name => "usr").set "foo"
  => nil
 2.1.2 :076 > browser.button(value: 'Login').click
  => []
 2.1.2 :077 > browser.iframe(id: 'ws').text_field(id:
 'claveConsultiva').set 'bar'
  => nil
 2.1.2 :078 > browser.iframe(id: 'ws').link(id: 'login_button').click
  => []
 2.1.2 :079 >


 On Mon, Nov 24, 2014 at 4:36 PM, Alberto Magalhaes <
 aacmagalh...@gmail.com> wrote:

> Joe,
> Line 10. thanks
>
> On Mon, Nov 24, 2014 at 10:35 PM, Alberto Magalhaes <
> aacmagalh...@gmail.com> wrote:
>
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:10:in
>> `locate': unable to locate iframe using {:id=>"ws", :tag_name=>"iframe"}
>> (Watir::Exception::UnknownFrameException)
>> from
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
>> `assert_exists'
>> from
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:31:in
>> `assert_exists'
>> from
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:532:in
>> `locate'
>> from
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
>> `assert_exists'
>> from
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/user_editable.rb:11:in
>> `set'
>> from teste_2.rb:8:in `'
>> >Exit code: 1
>>
>> On Mon, Nov 24, 2014 at 10:30 PM, Joe Fleck 
>> wrote:
>>
>>> Alberto,
>>>
>>> What line is this failing on?
>>>
>>> Joe
>>>
>>> On Mon, Nov 24, 2014 at 5:26 PM, Alberto Magalhaes <
>>> aacmagalh...@gmail.com> wrote:
>>>
 Titus,

 I'm trying this:
 require 'watir-webdriver'
 browser = Watir::Browser.new :chrome
 browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html
 ")
 browser.text_field(:name => "usr").set "foo"
 browser.button(:value => "Login").click
 usr=Nome%20de%20Utilizador'
 browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'bar'
 browser.iframe(id: 'ws').link(id: 'login_button').click


 On Mon, Nov 24, 2014 at 9:36 PM, Titus Fortner <
 titusfort...@gmail.com> wrote:

> This works for me.
>>>

Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Alberto Magalhaes
ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]
Watir 5.0
Google Chrome Version 39.0.2171.65

On Mon, Nov 24, 2014 at 10:50 PM, Titus Fortner 
wrote:

> What version Watir, Chrome & ChromeDriver? Does it work in Firefox?
>
> On Mon, Nov 24, 2014 at 4:48 PM, Alberto Magalhaes  > wrote:
>
>> same error :-(
>>
>> require 'watir-webdriver'
>> browser = Watir::Browser.new :chrome
>> browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html";)
>> #substituir o USERID pelo user de acesso
>> browser.text_field(:name => "usr").set "foo"
>> browser.button(:value => "Login").click
>> #browser.goto '
>> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
>> '
>> browser.iframe(id: "ws").text_field(id: "claveConsultiva").set 'bar'
>> browser.iframe(id: "ws").link(id: "login_button").click
>>
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:10:in
>> `locate': unable to locate iframe using {:id=>"ws", :tag_name=>"iframe"}
>> (Watir::Exception::UnknownFrameException)
>> from
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
>> `assert_exists'
>> from
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:31:in
>> `assert_exists'
>> from
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:532:in
>> `locate'
>> from
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
>> `assert_exists'
>> from
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/user_editable.rb:11:in
>> `set'
>> from teste_2.rb:8:in `'
>>
>>
>>
>> On Mon, Nov 24, 2014 at 10:44 PM, Titus Fortner 
>> wrote:
>>
>>> I take that back, I had a typo when trying to set. I'm not having any
>>> problem with the code...
>>>
>>> 2.1.2 :073 > browser = Watir::Browser.new :chrome
>>>  => #
>>> 2.1.2 :074 > browser.goto("
>>> https://www.santandertotta.pt/pt_PT/Particulares.html";)
>>>  => "https://www.santandertotta.pt/pt_PT/Particulares.html";
>>> 2.1.2 :075 > browser.text_field(:name => "usr").set "foo"
>>>  => nil
>>> 2.1.2 :076 > browser.button(value: 'Login').click
>>>  => []
>>> 2.1.2 :077 > browser.iframe(id: 'ws').text_field(id:
>>> 'claveConsultiva').set 'bar'
>>>  => nil
>>> 2.1.2 :078 > browser.iframe(id: 'ws').link(id: 'login_button').click
>>>  => []
>>> 2.1.2 :079 >
>>>
>>>
>>> On Mon, Nov 24, 2014 at 4:36 PM, Alberto Magalhaes <
>>> aacmagalh...@gmail.com> wrote:
>>>
 Joe,
 Line 10. thanks

 On Mon, Nov 24, 2014 at 10:35 PM, Alberto Magalhaes <
 aacmagalh...@gmail.com> wrote:

> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:10:in
> `locate': unable to locate iframe using {:id=>"ws", :tag_name=>"iframe"}
> (Watir::Exception::UnknownFrameException)
> from
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
> `assert_exists'
> from
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:31:in
> `assert_exists'
> from
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:532:in
> `locate'
> from
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
> `assert_exists'
> from
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/user_editable.rb:11:in
> `set'
> from teste_2.rb:8:in `'
> >Exit code: 1
>
> On Mon, Nov 24, 2014 at 10:30 PM, Joe Fleck 
> wrote:
>
>> Alberto,
>>
>> What line is this failing on?
>>
>> Joe
>>
>> On Mon, Nov 24, 2014 at 5:26 PM, Alberto Magalhaes <
>> aacmagalh...@gmail.com> wrote:
>>
>>> Titus,
>>>
>>> I'm trying this:
>>> require 'watir-webdriver'
>>> browser = Watir::Browser.new :chrome
>>> browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html
>>> ")
>>> browser.text_field(:name => "usr").set "foo"
>>> browser.button(:value => "Login").click
>>> usr=Nome%20de%20Utilizador'
>>> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'bar'
>>> browser.iframe(id: 'ws').link(id: 'login_button').click
>>>
>>>
>>> On Mon, Nov 24, 2014 at 9:36 PM, Titus Fortner <
>>> titusfort...@gmail.com> wrote:
>>>
 This works for me.

 browser = Watir::Browser.new :chrome
 browser.goto '
 https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
 '
 browser.iframe(id: 'ws').text_field(id:
 'identificacionUsuario').set 'Foo'
 browser.iframe(id: 'ws').text_field(id: 'claveConsulti

Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Titus Fortner
What version Watir, Chrome & ChromeDriver? Does it work in Firefox?

On Mon, Nov 24, 2014 at 4:48 PM, Alberto Magalhaes 
wrote:

> same error :-(
>
> require 'watir-webdriver'
> browser = Watir::Browser.new :chrome
> browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html";)
> #substituir o USERID pelo user de acesso
> browser.text_field(:name => "usr").set "foo"
> browser.button(:value => "Login").click
> #browser.goto '
> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
> '
> browser.iframe(id: "ws").text_field(id: "claveConsultiva").set 'bar'
> browser.iframe(id: "ws").link(id: "login_button").click
>
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:10:in
> `locate': unable to locate iframe using {:id=>"ws", :tag_name=>"iframe"}
> (Watir::Exception::UnknownFrameException)
> from
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
> `assert_exists'
> from
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:31:in
> `assert_exists'
> from
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:532:in
> `locate'
> from
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
> `assert_exists'
> from
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/user_editable.rb:11:in
> `set'
> from teste_2.rb:8:in `'
>
>
>
> On Mon, Nov 24, 2014 at 10:44 PM, Titus Fortner 
> wrote:
>
>> I take that back, I had a typo when trying to set. I'm not having any
>> problem with the code...
>>
>> 2.1.2 :073 > browser = Watir::Browser.new :chrome
>>  => #
>> 2.1.2 :074 > browser.goto("
>> https://www.santandertotta.pt/pt_PT/Particulares.html";)
>>  => "https://www.santandertotta.pt/pt_PT/Particulares.html";
>> 2.1.2 :075 > browser.text_field(:name => "usr").set "foo"
>>  => nil
>> 2.1.2 :076 > browser.button(value: 'Login').click
>>  => []
>> 2.1.2 :077 > browser.iframe(id: 'ws').text_field(id:
>> 'claveConsultiva').set 'bar'
>>  => nil
>> 2.1.2 :078 > browser.iframe(id: 'ws').link(id: 'login_button').click
>>  => []
>> 2.1.2 :079 >
>>
>>
>> On Mon, Nov 24, 2014 at 4:36 PM, Alberto Magalhaes <
>> aacmagalh...@gmail.com> wrote:
>>
>>> Joe,
>>> Line 10. thanks
>>>
>>> On Mon, Nov 24, 2014 at 10:35 PM, Alberto Magalhaes <
>>> aacmagalh...@gmail.com> wrote:
>>>
 C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:10:in
 `locate': unable to locate iframe using {:id=>"ws", :tag_name=>"iframe"}
 (Watir::Exception::UnknownFrameException)
 from
 C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
 `assert_exists'
 from
 C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:31:in
 `assert_exists'
 from
 C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:532:in
 `locate'
 from
 C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
 `assert_exists'
 from
 C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/user_editable.rb:11:in
 `set'
 from teste_2.rb:8:in `'
 >Exit code: 1

 On Mon, Nov 24, 2014 at 10:30 PM, Joe Fleck 
 wrote:

> Alberto,
>
> What line is this failing on?
>
> Joe
>
> On Mon, Nov 24, 2014 at 5:26 PM, Alberto Magalhaes <
> aacmagalh...@gmail.com> wrote:
>
>> Titus,
>>
>> I'm trying this:
>> require 'watir-webdriver'
>> browser = Watir::Browser.new :chrome
>> browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html";)
>> browser.text_field(:name => "usr").set "foo"
>> browser.button(:value => "Login").click
>> usr=Nome%20de%20Utilizador'
>> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'bar'
>> browser.iframe(id: 'ws').link(id: 'login_button').click
>>
>>
>> On Mon, Nov 24, 2014 at 9:36 PM, Titus Fortner <
>> titusfort...@gmail.com> wrote:
>>
>>> This works for me.
>>>
>>> browser = Watir::Browser.new :chrome
>>> browser.goto '
>>> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
>>> '
>>> browser.iframe(id: 'ws').text_field(id: 'identificacionUsuario').set
>>> 'Foo'
>>> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'Bar'
>>> browser.iframe(id: 'ws').link(id: 'login_button').click
>>>
>>> On Mon, Nov 24, 2014 at 3:19 PM, Alberto Magalhães <
>>> aacmagalh...@gmail.com> wrote:
>>>

 Joe and Titus

 it's not working.

 I'm trying to access '

Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Alberto Magalhaes
same error :-(

require 'watir-webdriver'
browser = Watir::Browser.new :chrome
browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html";)
#substituir o USERID pelo user de acesso
browser.text_field(:name => "usr").set "foo"
browser.button(:value => "Login").click
#browser.goto '
https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
'
browser.iframe(id: "ws").text_field(id: "claveConsultiva").set 'bar'
browser.iframe(id: "ws").link(id: "login_button").click

C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:10:in
`locate': unable to locate iframe using {:id=>"ws", :tag_name=>"iframe"}
(Watir::Exception::UnknownFrameException)
from
C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
`assert_exists'
from
C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:31:in
`assert_exists'
from
C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:532:in
`locate'
from
C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
`assert_exists'
from
C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/user_editable.rb:11:in
`set'
from teste_2.rb:8:in `'



On Mon, Nov 24, 2014 at 10:44 PM, Titus Fortner 
wrote:

> I take that back, I had a typo when trying to set. I'm not having any
> problem with the code...
>
> 2.1.2 :073 > browser = Watir::Browser.new :chrome
>  => #
> 2.1.2 :074 > browser.goto("
> https://www.santandertotta.pt/pt_PT/Particulares.html";)
>  => "https://www.santandertotta.pt/pt_PT/Particulares.html";
> 2.1.2 :075 > browser.text_field(:name => "usr").set "foo"
>  => nil
> 2.1.2 :076 > browser.button(value: 'Login').click
>  => []
> 2.1.2 :077 > browser.iframe(id: 'ws').text_field(id:
> 'claveConsultiva').set 'bar'
>  => nil
> 2.1.2 :078 > browser.iframe(id: 'ws').link(id: 'login_button').click
>  => []
> 2.1.2 :079 >
>
>
> On Mon, Nov 24, 2014 at 4:36 PM, Alberto Magalhaes  > wrote:
>
>> Joe,
>> Line 10. thanks
>>
>> On Mon, Nov 24, 2014 at 10:35 PM, Alberto Magalhaes <
>> aacmagalh...@gmail.com> wrote:
>>
>>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:10:in
>>> `locate': unable to locate iframe using {:id=>"ws", :tag_name=>"iframe"}
>>> (Watir::Exception::UnknownFrameException)
>>> from
>>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
>>> `assert_exists'
>>> from
>>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:31:in
>>> `assert_exists'
>>> from
>>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:532:in
>>> `locate'
>>> from
>>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
>>> `assert_exists'
>>> from
>>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/user_editable.rb:11:in
>>> `set'
>>> from teste_2.rb:8:in `'
>>> >Exit code: 1
>>>
>>> On Mon, Nov 24, 2014 at 10:30 PM, Joe Fleck 
>>> wrote:
>>>
 Alberto,

 What line is this failing on?

 Joe

 On Mon, Nov 24, 2014 at 5:26 PM, Alberto Magalhaes <
 aacmagalh...@gmail.com> wrote:

> Titus,
>
> I'm trying this:
> require 'watir-webdriver'
> browser = Watir::Browser.new :chrome
> browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html";)
> browser.text_field(:name => "usr").set "foo"
> browser.button(:value => "Login").click
> usr=Nome%20de%20Utilizador'
> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'bar'
> browser.iframe(id: 'ws').link(id: 'login_button').click
>
>
> On Mon, Nov 24, 2014 at 9:36 PM, Titus Fortner  > wrote:
>
>> This works for me.
>>
>> browser = Watir::Browser.new :chrome
>> browser.goto '
>> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
>> '
>> browser.iframe(id: 'ws').text_field(id: 'identificacionUsuario').set
>> 'Foo'
>> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'Bar'
>> browser.iframe(id: 'ws').link(id: 'login_button').click
>>
>> On Mon, Nov 24, 2014 at 3:19 PM, Alberto Magalhães <
>> aacmagalh...@gmail.com> wrote:
>>
>>>
>>> Joe and Titus
>>>
>>> it's not working.
>>>
>>> I'm trying to access 'claveConsultiva' that is present on
>>> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
>>>
>>> thanks in advance
>>>
>>>
>>> Segunda-feira, 24 de Novembro de 2014 18:11:47 UTC, Alberto
>>> Magalhães escreveu:
>>>
 Hi,

 I'm having troubl

Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Titus Fortner
I take that back, I had a typo when trying to set. I'm not having any
problem with the code...

2.1.2 :073 > browser = Watir::Browser.new :chrome
 => #
2.1.2 :074 > browser.goto("
https://www.santandertotta.pt/pt_PT/Particulares.html";)
 => "https://www.santandertotta.pt/pt_PT/Particulares.html";
2.1.2 :075 > browser.text_field(:name => "usr").set "foo"
 => nil
2.1.2 :076 > browser.button(value: 'Login').click
 => []
2.1.2 :077 > browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set
'bar'
 => nil
2.1.2 :078 > browser.iframe(id: 'ws').link(id: 'login_button').click
 => []
2.1.2 :079 >


On Mon, Nov 24, 2014 at 4:36 PM, Alberto Magalhaes 
wrote:

> Joe,
> Line 10. thanks
>
> On Mon, Nov 24, 2014 at 10:35 PM, Alberto Magalhaes <
> aacmagalh...@gmail.com> wrote:
>
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:10:in
>> `locate': unable to locate iframe using {:id=>"ws", :tag_name=>"iframe"}
>> (Watir::Exception::UnknownFrameException)
>> from
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
>> `assert_exists'
>> from
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:31:in
>> `assert_exists'
>> from
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:532:in
>> `locate'
>> from
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
>> `assert_exists'
>> from
>> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/user_editable.rb:11:in
>> `set'
>> from teste_2.rb:8:in `'
>> >Exit code: 1
>>
>> On Mon, Nov 24, 2014 at 10:30 PM, Joe Fleck  wrote:
>>
>>> Alberto,
>>>
>>> What line is this failing on?
>>>
>>> Joe
>>>
>>> On Mon, Nov 24, 2014 at 5:26 PM, Alberto Magalhaes <
>>> aacmagalh...@gmail.com> wrote:
>>>
 Titus,

 I'm trying this:
 require 'watir-webdriver'
 browser = Watir::Browser.new :chrome
 browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html";)
 browser.text_field(:name => "usr").set "foo"
 browser.button(:value => "Login").click
 usr=Nome%20de%20Utilizador'
 browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'bar'
 browser.iframe(id: 'ws').link(id: 'login_button').click


 On Mon, Nov 24, 2014 at 9:36 PM, Titus Fortner 
 wrote:

> This works for me.
>
> browser = Watir::Browser.new :chrome
> browser.goto '
> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
> '
> browser.iframe(id: 'ws').text_field(id: 'identificacionUsuario').set
> 'Foo'
> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'Bar'
> browser.iframe(id: 'ws').link(id: 'login_button').click
>
> On Mon, Nov 24, 2014 at 3:19 PM, Alberto Magalhães <
> aacmagalh...@gmail.com> wrote:
>
>>
>> Joe and Titus
>>
>> it's not working.
>>
>> I'm trying to access 'claveConsultiva' that is present on
>> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
>>
>> thanks in advance
>>
>>
>> Segunda-feira, 24 de Novembro de 2014 18:11:47 UTC, Alberto Magalhães
>> escreveu:
>>
>>> Hi,
>>>
>>> I'm having trouble getting access to a password text field -
>>> claveConsultiva
>>>
>>> I apreciate all the help
>>>
>>>  Entrar no NetBanco Particulares
>>>>> class="boxarrowdownon"> Particulares  
>>>Para aceder às
>>> suas contas, introduza o Nome de Utilizador e o Código de Acesso.
>>> Por razões de segurança, recomendamos a utilização do
>>> Teclado Virtual.  >> autocomplete="off" method="post" action="../login/?">   >> value="48A2057113F89EA3741705D7968B4AFFD8F8A23F"/> Nome de Utilizador >> type="text" class="inputlong" id="identificacionUsuario" name="
>>> identificacionUsuario" value="210348500" maxlength="64" autocomplete
>>> ="off" /> >> ="inner"> Código de Acesso >> type="password" id="claveConsultiva" name="claveConsultiva"
>>> maxlength="16" autocomplete="off" /> >> title="Teclado Virtual" alt="Teclado Virtual"> 
>>>
>>> 
>>>
>>  --
>> --
>> Before posting, please read http://watir.com/support. In short:
>> search before you ask, be nice.
>>
>> watir-general@googlegroups.com
>> http://groups.google.com/group/watir-general
>> watir-general+unsubscr...@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to the Google
>> Groups "Watir General" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to watir-general+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/o

Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Alberto Magalhaes
Joe,
Line 10. thanks

On Mon, Nov 24, 2014 at 10:35 PM, Alberto Magalhaes 
wrote:

> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:10:in
> `locate': unable to locate iframe using {:id=>"ws", :tag_name=>"iframe"}
> (Watir::Exception::UnknownFrameException)
> from
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
> `assert_exists'
> from
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:31:in
> `assert_exists'
> from
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:532:in
> `locate'
> from
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
> `assert_exists'
> from
> C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/user_editable.rb:11:in
> `set'
> from teste_2.rb:8:in `'
> >Exit code: 1
>
> On Mon, Nov 24, 2014 at 10:30 PM, Joe Fleck  wrote:
>
>> Alberto,
>>
>> What line is this failing on?
>>
>> Joe
>>
>> On Mon, Nov 24, 2014 at 5:26 PM, Alberto Magalhaes <
>> aacmagalh...@gmail.com> wrote:
>>
>>> Titus,
>>>
>>> I'm trying this:
>>> require 'watir-webdriver'
>>> browser = Watir::Browser.new :chrome
>>> browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html";)
>>> browser.text_field(:name => "usr").set "foo"
>>> browser.button(:value => "Login").click
>>> usr=Nome%20de%20Utilizador'
>>> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'bar'
>>> browser.iframe(id: 'ws').link(id: 'login_button').click
>>>
>>>
>>> On Mon, Nov 24, 2014 at 9:36 PM, Titus Fortner 
>>> wrote:
>>>
 This works for me.

 browser = Watir::Browser.new :chrome
 browser.goto '
 https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
 '
 browser.iframe(id: 'ws').text_field(id: 'identificacionUsuario').set
 'Foo'
 browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'Bar'
 browser.iframe(id: 'ws').link(id: 'login_button').click

 On Mon, Nov 24, 2014 at 3:19 PM, Alberto Magalhães <
 aacmagalh...@gmail.com> wrote:

>
> Joe and Titus
>
> it's not working.
>
> I'm trying to access 'claveConsultiva' that is present on
> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
>
> thanks in advance
>
>
> Segunda-feira, 24 de Novembro de 2014 18:11:47 UTC, Alberto Magalhães
> escreveu:
>
>> Hi,
>>
>> I'm having trouble getting access to a password text field -
>> claveConsultiva
>>
>> I apreciate all the help
>>
>>  Entrar no NetBanco Particulares 
>>Particulares  
>>Para aceder às suas
>> contas, introduza o Nome de Utilizador e o Código de Acesso.
>> Por razões de segurança, recomendamos a utilização do
>> Teclado Virtual.  > ="off" method="post" action="../login/?">> ="linkHomeURL" value="/pagina/indice/0,,276_1_2,00.html"/>  > class="input_container">  Nome de Utilizador > type="text" class="inputlong" id="identificacionUsuario" name="
>> identificacionUsuario" value="210348500" maxlength="64" autocomplete
>> ="off" />  Código de Acesso > type="password" id="claveConsultiva" name="claveConsultiva" maxlength
>> ="16" autocomplete="off" /> > title="Teclado
>> Virtual" alt="Teclado Virtual">  
>>  
>> 
>>
>  --
> --
> Before posting, please read http://watir.com/support. In short:
> search before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>
> ---
> You received this message because you are subscribed to the Google
> Groups "Watir General" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to watir-general+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

  --
 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
 watir-general+unsubscr...@googlegroups.com

 ---
 You received this message because you are subscribed to a topic in the
 Google Groups "Watir General" group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/watir-general/lUfGWIwZ_Xc/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to
 watir-general+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>  --
>>> --
>>> Before posting, please read http://watir.com/support. In short: search

Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Alberto Magalhaes
C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:10:in
`locate': unable to locate iframe using {:id=>"ws", :tag_name=>"iframe"}
(Watir::Exception::UnknownFrameException)
from
C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
`assert_exists'
from
C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/iframe.rb:31:in
`assert_exists'
from
C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:532:in
`locate'
from
C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/elements/element.rb:510:in
`assert_exists'
from
C:/Ruby21/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.11/lib/watir-webdriver/user_editable.rb:11:in
`set'
from teste_2.rb:8:in `'
>Exit code: 1

On Mon, Nov 24, 2014 at 10:30 PM, Joe Fleck  wrote:

> Alberto,
>
> What line is this failing on?
>
> Joe
>
> On Mon, Nov 24, 2014 at 5:26 PM, Alberto Magalhaes  > wrote:
>
>> Titus,
>>
>> I'm trying this:
>> require 'watir-webdriver'
>> browser = Watir::Browser.new :chrome
>> browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html";)
>> browser.text_field(:name => "usr").set "foo"
>> browser.button(:value => "Login").click
>> usr=Nome%20de%20Utilizador'
>> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'bar'
>> browser.iframe(id: 'ws').link(id: 'login_button').click
>>
>>
>> On Mon, Nov 24, 2014 at 9:36 PM, Titus Fortner 
>> wrote:
>>
>>> This works for me.
>>>
>>> browser = Watir::Browser.new :chrome
>>> browser.goto '
>>> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
>>> '
>>> browser.iframe(id: 'ws').text_field(id: 'identificacionUsuario').set
>>> 'Foo'
>>> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'Bar'
>>> browser.iframe(id: 'ws').link(id: 'login_button').click
>>>
>>> On Mon, Nov 24, 2014 at 3:19 PM, Alberto Magalhães <
>>> aacmagalh...@gmail.com> wrote:
>>>

 Joe and Titus

 it's not working.

 I'm trying to access 'claveConsultiva' that is present on
 https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador

 thanks in advance


 Segunda-feira, 24 de Novembro de 2014 18:11:47 UTC, Alberto Magalhães
 escreveu:

> Hi,
>
> I'm having trouble getting access to a password text field -
> claveConsultiva
>
> I apreciate all the help
>
>  Entrar no NetBanco Particulares 
>Particulares   title="Entrar no NetBanco Empresas">
>Para aceder às suas
> contas, introduza o Nome de Utilizador e o Código de Acesso.
> Por razões de segurança, recomendamos a utilização do Teclado
> Virtual.   method="post" action="../login/?">  value="3"/>    ="linkHomeURL" value="/pagina/indice/0,,276_1_2,00.html"/>   ="input_container">  Nome de Utilizador  type="text" class="inputlong" id="identificacionUsuario" name="
> identificacionUsuario" value="210348500" maxlength="64" autocomplete="
> off" />  Código de Acesso  type="password" id="claveConsultiva" name="claveConsultiva" maxlength
> ="16" autocomplete="off" />  title="Teclado
> Virtual" alt="Teclado Virtual">  
>  
> 
>
  --
 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
 watir-general+unsubscr...@googlegroups.com

 ---
 You received this message because you are subscribed to the Google
 Groups "Watir General" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to watir-general+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>  --
>>> --
>>> Before posting, please read http://watir.com/support. In short: search
>>> before you ask, be nice.
>>>
>>> watir-general@googlegroups.com
>>> http://groups.google.com/group/watir-general
>>> watir-general+unsubscr...@googlegroups.com
>>>
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Watir General" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/watir-general/lUfGWIwZ_Xc/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> watir-general+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> --
>> Before posting, please read http://watir.com/support. In short: search
>> before you ask, be nice.
>>
>> watir-general@googlegroups.com
>> http://groups.google.com/group/watir-general
>> watir-general+unsubscr...@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to the

Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Titus Fortner
Sometimes there are issues with auto-focus elements.

Add this line before the set, and it will work.
browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').click

On Mon, Nov 24, 2014 at 4:30 PM, Joe Fleck  wrote:

> Alberto,
>
> What line is this failing on?
>
> Joe
>
> On Mon, Nov 24, 2014 at 5:26 PM, Alberto Magalhaes  > wrote:
>
>> Titus,
>>
>> I'm trying this:
>> require 'watir-webdriver'
>> browser = Watir::Browser.new :chrome
>> browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html";)
>> browser.text_field(:name => "usr").set "foo"
>> browser.button(:value => "Login").click
>> usr=Nome%20de%20Utilizador'
>> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'bar'
>> browser.iframe(id: 'ws').link(id: 'login_button').click
>>
>>
>> On Mon, Nov 24, 2014 at 9:36 PM, Titus Fortner 
>> wrote:
>>
>>> This works for me.
>>>
>>> browser = Watir::Browser.new :chrome
>>> browser.goto '
>>> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
>>> '
>>> browser.iframe(id: 'ws').text_field(id: 'identificacionUsuario').set
>>> 'Foo'
>>> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'Bar'
>>> browser.iframe(id: 'ws').link(id: 'login_button').click
>>>
>>> On Mon, Nov 24, 2014 at 3:19 PM, Alberto Magalhães <
>>> aacmagalh...@gmail.com> wrote:
>>>

 Joe and Titus

 it's not working.

 I'm trying to access 'claveConsultiva' that is present on
 https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador

 thanks in advance


 Segunda-feira, 24 de Novembro de 2014 18:11:47 UTC, Alberto Magalhães
 escreveu:

> Hi,
>
> I'm having trouble getting access to a password text field -
> claveConsultiva
>
> I apreciate all the help
>
>  Entrar no NetBanco Particulares 
>Particulares   title="Entrar no NetBanco Empresas">
>Para aceder às suas
> contas, introduza o Nome de Utilizador e o Código de Acesso.
> Por razões de segurança, recomendamos a utilização do Teclado
> Virtual.   method="post" action="../login/?">  value="3"/>    ="linkHomeURL" value="/pagina/indice/0,,276_1_2,00.html"/>   ="input_container">  Nome de Utilizador  type="text" class="inputlong" id="identificacionUsuario" name="
> identificacionUsuario" value="210348500" maxlength="64" autocomplete="
> off" />  Código de Acesso  type="password" id="claveConsultiva" name="claveConsultiva" maxlength
> ="16" autocomplete="off" />  title="Teclado
> Virtual" alt="Teclado Virtual">  
>  
> 
>
  --
 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
 watir-general+unsubscr...@googlegroups.com

 ---
 You received this message because you are subscribed to the Google
 Groups "Watir General" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to watir-general+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>  --
>>> --
>>> Before posting, please read http://watir.com/support. In short: search
>>> before you ask, be nice.
>>>
>>> watir-general@googlegroups.com
>>> http://groups.google.com/group/watir-general
>>> watir-general+unsubscr...@googlegroups.com
>>>
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Watir General" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/watir-general/lUfGWIwZ_Xc/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> watir-general+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> --
>> Before posting, please read http://watir.com/support. In short: search
>> before you ask, be nice.
>>
>> watir-general@googlegroups.com
>> http://groups.google.com/group/watir-general
>> watir-general+unsubscr...@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Watir General" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to watir-general+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Watir General" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to watir-general+unsubsc

Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Joe Fleck
Alberto,

What line is this failing on?

Joe

On Mon, Nov 24, 2014 at 5:26 PM, Alberto Magalhaes 
wrote:

> Titus,
>
> I'm trying this:
> require 'watir-webdriver'
> browser = Watir::Browser.new :chrome
> browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html";)
> browser.text_field(:name => "usr").set "foo"
> browser.button(:value => "Login").click
> usr=Nome%20de%20Utilizador'
> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'bar'
> browser.iframe(id: 'ws').link(id: 'login_button').click
>
>
> On Mon, Nov 24, 2014 at 9:36 PM, Titus Fortner 
> wrote:
>
>> This works for me.
>>
>> browser = Watir::Browser.new :chrome
>> browser.goto '
>> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
>> '
>> browser.iframe(id: 'ws').text_field(id: 'identificacionUsuario').set 'Foo'
>> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'Bar'
>> browser.iframe(id: 'ws').link(id: 'login_button').click
>>
>> On Mon, Nov 24, 2014 at 3:19 PM, Alberto Magalhães <
>> aacmagalh...@gmail.com> wrote:
>>
>>>
>>> Joe and Titus
>>>
>>> it's not working.
>>>
>>> I'm trying to access 'claveConsultiva' that is present on
>>> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
>>>
>>> thanks in advance
>>>
>>>
>>> Segunda-feira, 24 de Novembro de 2014 18:11:47 UTC, Alberto Magalhães
>>> escreveu:
>>>
 Hi,

 I'm having trouble getting access to a password text field -
 claveConsultiva

 I apreciate all the help

  Entrar no NetBanco Particulares 
Particulares  >>> title="Entrar no NetBanco Empresas">
Para aceder às suas
 contas, introduza o Nome de Utilizador e o Código de Acesso.
 Por razões de segurança, recomendamos a utilização do Teclado
 Virtual.  >>> method="post" action="../login/?"> >>> value="3"/>   Nome de Utilizador >>> ="text" class="inputlong" id="identificacionUsuario" name="
 identificacionUsuario" value="210348500" maxlength="64" autocomplete="
 off" />  Código de Acesso >>> type="password" id="claveConsultiva" name="claveConsultiva" maxlength="
 16" autocomplete="off" />   
  
 

>>>  --
>>> --
>>> Before posting, please read http://watir.com/support. In short: search
>>> before you ask, be nice.
>>>
>>> watir-general@googlegroups.com
>>> http://groups.google.com/group/watir-general
>>> watir-general+unsubscr...@googlegroups.com
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Watir General" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to watir-general+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> --
>> Before posting, please read http://watir.com/support. In short: search
>> before you ask, be nice.
>>
>> watir-general@googlegroups.com
>> http://groups.google.com/group/watir-general
>> watir-general+unsubscr...@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Watir General" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/watir-general/lUfGWIwZ_Xc/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> watir-general+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Watir General" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to watir-general+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Alberto Magalhaes
Titus,

I'm trying this:
require 'watir-webdriver'
browser = Watir::Browser.new :chrome
browser.goto("https://www.santandertotta.pt/pt_PT/Particulares.html";)
browser.text_field(:name => "usr").set "foo"
browser.button(:value => "Login").click
usr=Nome%20de%20Utilizador'
browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'bar'
browser.iframe(id: 'ws').link(id: 'login_button').click


On Mon, Nov 24, 2014 at 9:36 PM, Titus Fortner 
wrote:

> This works for me.
>
> browser = Watir::Browser.new :chrome
> browser.goto '
> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
> '
> browser.iframe(id: 'ws').text_field(id: 'identificacionUsuario').set 'Foo'
> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'Bar'
> browser.iframe(id: 'ws').link(id: 'login_button').click
>
> On Mon, Nov 24, 2014 at 3:19 PM, Alberto Magalhães  > wrote:
>
>>
>> Joe and Titus
>>
>> it's not working.
>>
>> I'm trying to access 'claveConsultiva' that is present on
>> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
>>
>> thanks in advance
>>
>>
>> Segunda-feira, 24 de Novembro de 2014 18:11:47 UTC, Alberto Magalhães
>> escreveu:
>>
>>> Hi,
>>>
>>> I'm having trouble getting access to a password text field -
>>> claveConsultiva
>>>
>>> I apreciate all the help
>>>
>>>  Entrar no NetBanco Particulares 
>>>Particulares  >> title="Entrar no NetBanco Empresas">
>>>Para aceder às suas
>>> contas, introduza o Nome de Utilizador e o Código de Acesso.
>>> Por razões de segurança, recomendamos a utilização do Teclado
>>> Virtual.  >> method="post" action="../login/?"> >> value="3"/>   Nome de Utilizador >> ="210348500" maxlength="64" autocomplete="off" />>> class="input_container">  Código de Acesso >> /> 
>>> 
>>>
>>  --
>> --
>> Before posting, please read http://watir.com/support. In short: search
>> before you ask, be nice.
>>
>> watir-general@googlegroups.com
>> http://groups.google.com/group/watir-general
>> watir-general+unsubscr...@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Watir General" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to watir-general+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Watir General" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/watir-general/lUfGWIwZ_Xc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> watir-general+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Titus Fortner
This works for me.

browser = Watir::Browser.new :chrome
browser.goto '
https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
'
browser.iframe(id: 'ws').text_field(id: 'identificacionUsuario').set 'Foo'
browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set 'Bar'
browser.iframe(id: 'ws').link(id: 'login_button').click

On Mon, Nov 24, 2014 at 3:19 PM, Alberto Magalhães 
wrote:

>
> Joe and Titus
>
> it's not working.
>
> I'm trying to access 'claveConsultiva' that is present on
> https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador
>
> thanks in advance
>
>
> Segunda-feira, 24 de Novembro de 2014 18:11:47 UTC, Alberto Magalhães
> escreveu:
>
>> Hi,
>>
>> I'm having trouble getting access to a password text field -
>> claveConsultiva
>>
>> I apreciate all the help
>>
>>  Entrar no NetBanco Particulares 
>>Particulares  > title="Entrar no NetBanco Empresas">
>>Para aceder às suas
>> contas, introduza o Nome de Utilizador e o Código de Acesso.Por
>> razões de segurança, recomendamos a utilização do Teclado Virtual.
>>   > action="../login/?">   > type="hidden" name="ssafe" value="48A2057113F89EA3741705D
>> 7968B4AFFD8F8A23F"/>> class="inner"> Nome de Utilizador
>>  > maxlength="64" autocomplete="off" />  Código
>> de Acesso  
>> 
>> 
>>
>  --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Watir General" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to watir-general+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Alberto Magalhães

Joe and Titus 

it's not working.

I'm trying to access 'claveConsultiva' that is present on 
https://www.particulares.santandertotta.pt/pagina/indice/0,,276_1_2,00.html?usr=Nome%20de%20Utilizador

thanks in advance


Segunda-feira, 24 de Novembro de 2014 18:11:47 UTC, Alberto Magalhães 
escreveu:
>
> Hi,
>
> I'm having trouble getting access to a password text field - 
> claveConsultiva
>
> I apreciate all the help
>
>  Entrar no NetBanco Particularesclass="fl navon" style="position: relative"> 
>  Particulares   
>Para aceder às suas 
> contas, introduza o Nome de Utilizador e o Código de Acesso.Por 
> razões de segurança, recomendamos a utilização do Teclado Virtual.
>action="../login/?">type="hidden" name="ssafe" value="48A2057113F89EA3741705D7968B4AFFD8F8A23F
> "/> class="inner"> Nome de Utilizador
>   maxlength="64" autocomplete="off" />  Código 
> de Acesso   
>  class="fc">   
> 
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Joe Fleck
Yes.  Definitely not having the iframe will cause it not to work.

Joe

On Mon, Nov 24, 2014 at 2:37 PM, Titus Fortner 
wrote:

> Ah, the html didn't have the iframe in it. so:
>
> browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set "foobar"
>
>
> On Mon, Nov 24, 2014 at 1:33 PM, Alberto Magalhaes  > wrote:
>
>> Thanks Titu..
>>
>> Bu i think is probably because of the iframe.
>>
>>
>> https://www.particulares.santandertotta.pt/bepp/sanpt/usuarios/login/0,,,0.shtml?usr=210348500>"
>> onLoad="startdyncode()" frameborder="0" style="overflow: hidden; width:
>> 100%; z-index:200; position:relative; min-height:400px" scrolling="no" >
>>   > content="private,no-cache,no-store,must-revalidate,max-age=0"/> > http-equiv="Pragma" content="no-cache"/> > content="1"/> 
>>
>> On Mon, Nov 24, 2014 at 6:49 PM, Titus Fortner 
>> wrote:
>>
>>> This works with the html you posted.
>>>
>>> >> src="/bepp/sanpt/usuarios/login/0,,,0.shtml?usr=210348500
>>>  
>>> "
>>>  onLoad="startdyncode()" frameborder="0" style="overflow: hidden; width: 
>>> 100%; z-index:200; position:relative; min-height:400px" scrolling="no" 
>>> >>> content="private,no-cache,no-store,must-revalidate,max-age=0"/>>> http-equiv="Pragma" content="no-cache"/>>> content="1"/>
>>>
>>> browser.text_field(id: 'claveConsultiva').set "foobar"
>>>
>>>
>>>
>>>
>>>
>>> On Monday, November 24, 2014 12:11:47 PM UTC-6, Alberto Magalhães wrote:

 Hi,

 I'm having trouble getting access to a password text field -
 claveConsultiva

 I apreciate all the help

  Entrar no NetBanco Particulares 
Particulares  >>> title="Entrar no NetBanco Empresas">
Para aceder às suas
 contas, introduza o Nome de Utilizador e o Código de Acesso.
 Por razões de segurança, recomendamos a utilização do Teclado
 Virtual.  >>> method="post" action="../login/?"> >>> value="3"/>   Nome de Utilizador >>> ="text" class="inputlong" id="identificacionUsuario" name="
 identificacionUsuario" value="210348500" maxlength="64" autocomplete="
 off" />  Código de Acesso >>> type="password" id="claveConsultiva" name="claveConsultiva" maxlength="
 16" autocomplete="off" />   
  
 

>>>  --
>>> --
>>> Before posting, please read http://watir.com/support. In short: search
>>> before you ask, be nice.
>>>
>>> watir-general@googlegroups.com
>>> http://groups.google.com/group/watir-general
>>> watir-general+unsubscr...@googlegroups.com
>>>
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Watir General" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/watir-general/lUfGWIwZ_Xc/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> watir-general+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> --
>> Before posting, please read http://watir.com/support. In short: search
>> before you ask, be nice.
>>
>> watir-general@googlegroups.com
>> http://groups.google.com/group/watir-general
>> watir-general+unsubscr...@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Watir General" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to watir-general+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Watir General" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to watir-general+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Titus Fortner
Ah, the html didn't have the iframe in it. so:

browser.iframe(id: 'ws').text_field(id: 'claveConsultiva').set "foobar"


On Mon, Nov 24, 2014 at 1:33 PM, Alberto Magalhaes 
wrote:

> Thanks Titu..
>
> Bu i think is probably because of the iframe.
>
>
> https://www.particulares.santandertotta.pt/bepp/sanpt/usuarios/login/0,,,0.shtml?usr=210348500>"
> onLoad="startdyncode()" frameborder="0" style="overflow: hidden; width:
> 100%; z-index:200; position:relative; min-height:400px" scrolling="no" >
>content="private,no-cache,no-store,must-revalidate,max-age=0"/>  http-equiv="Pragma" content="no-cache"/>  content="1"/> 
>
> On Mon, Nov 24, 2014 at 6:49 PM, Titus Fortner 
> wrote:
>
>> This works with the html you posted.
>>
>> > src="/bepp/sanpt/usuarios/login/0,,,0.shtml?usr=210348500
>>  
>> "
>>  onLoad="startdyncode()" frameborder="0" style="overflow: hidden; width: 
>> 100%; z-index:200; position:relative; min-height:400px" scrolling="no" 
>> >> content="private,no-cache,no-store,must-revalidate,max-age=0"/>> http-equiv="Pragma" content="no-cache"/>> content="1"/>
>>
>> browser.text_field(id: 'claveConsultiva').set "foobar"
>>
>>
>>
>>
>>
>> On Monday, November 24, 2014 12:11:47 PM UTC-6, Alberto Magalhães wrote:
>>>
>>> Hi,
>>>
>>> I'm having trouble getting access to a password text field -
>>> claveConsultiva
>>>
>>> I apreciate all the help
>>>
>>>  Entrar no NetBanco Particulares 
>>>Particulares  >> title="Entrar no NetBanco Empresas">
>>>Para aceder às suas
>>> contas, introduza o Nome de Utilizador e o Código de Acesso.
>>> Por razões de segurança, recomendamos a utilização do Teclado
>>> Virtual.  >> method="post" action="../login/?"> >> value="3"/>   Nome de Utilizador >> ="210348500" maxlength="64" autocomplete="off" />>> class="input_container">  Código de Acesso >> /> 
>>> 
>>>
>>  --
>> --
>> Before posting, please read http://watir.com/support. In short: search
>> before you ask, be nice.
>>
>> watir-general@googlegroups.com
>> http://groups.google.com/group/watir-general
>> watir-general+unsubscr...@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Watir General" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/watir-general/lUfGWIwZ_Xc/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> watir-general+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Watir General" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to watir-general+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Alberto Magalhaes
Thanks Titu..

Bu i think is probably because of the iframe.


https://www.particulares.santandertotta.pt/bepp/sanpt/usuarios/login/0,,,0.shtml?usr=210348500>"
onLoad="startdyncode()" frameborder="0" style="overflow: hidden; width:
100%; z-index:200; position:relative; min-height:400px" scrolling="no" >
 

On Mon, Nov 24, 2014 at 6:49 PM, Titus Fortner 
wrote:

> This works with the html you posted.
>
>  src="/bepp/sanpt/usuarios/login/0,,,0.shtml?usr=210348500
>  
> "
>  onLoad="startdyncode()" frameborder="0" style="overflow: hidden; width: 
> 100%; z-index:200; position:relative; min-height:400px" scrolling="no" 
> > content="private,no-cache,no-store,must-revalidate,max-age=0"/> http-equiv="Pragma" content="no-cache"/> content="1"/>
>
> browser.text_field(id: 'claveConsultiva').set "foobar"
>
>
>
>
>
> On Monday, November 24, 2014 12:11:47 PM UTC-6, Alberto Magalhães wrote:
>>
>> Hi,
>>
>> I'm having trouble getting access to a password text field -
>> claveConsultiva
>>
>> I apreciate all the help
>>
>>  Entrar no NetBanco Particulares 
>>Particulares  > title="Entrar no NetBanco Empresas">
>>Para aceder às suas
>> contas, introduza o Nome de Utilizador e o Código de Acesso.Por
>> razões de segurança, recomendamos a utilização do Teclado Virtual.
>>   > action="../login/?">   > type="hidden" name="ssafe" value="48A2057113F89EA3741705D
>> 7968B4AFFD8F8A23F"/>> class="inner"> Nome de Utilizador
>>  > maxlength="64" autocomplete="off" />  Código
>> de Acesso  
>> 
>> 
>>
>  --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Watir General" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/watir-general/lUfGWIwZ_Xc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> watir-general+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[wtr-general] Re: HELP - Acessing password (text) field

2014-11-24 Thread Titus Fortner


This works with the html you posted.


browser.text_field(id: 'claveConsultiva').set "foobar"





On Monday, November 24, 2014 12:11:47 PM UTC-6, Alberto Magalhães wrote:
>
> Hi,
>
> I'm having trouble getting access to a password text field - 
> claveConsultiva
>
> I apreciate all the help
>
>  Entrar no NetBanco Particularesclass="fl navon" style="position: relative"> 
>  Particulares   
>Para aceder às suas 
> contas, introduza o Nome de Utilizador e o Código de Acesso.Por 
> razões de segurança, recomendamos a utilização do Teclado Virtual.
>action="../login/?">type="hidden" name="ssafe" value="48A2057113F89EA3741705D7968B4AFFD8F8A23F
> "/> class="inner"> Nome de Utilizador
>   maxlength="64" autocomplete="off" />  Código 
> de Acesso   
>  class="fc">   
> 
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[wtr-general] Re: Help for mysql connect and security warning in internet explorer ie8.

2014-01-15 Thread Max Holzheu
I'm having exactly the same symptoms, and yes, both of us installed the 
mysql gem (you can see that in the gem list, there is a gem called *mysql 
(2.9.1 x86-mingw32). *Thanks for any help!
. 
On Thursday, December 5, 2013 8:38:51 AM UTC-6, Super Kevy wrote:
>
> And you did gem install mysql?
>
>
>
> On Wednesday, December 4, 2013 2:33:59 AM UTC-6, Bhavesh wrote:
>>
>> Hi,
>>
>>  
>>
>> I have ruby 193 installed and have following gems on my machine :
>>
>>  
>>
>> *** LOCAL GEMS ***
>>
>>  
>>
>> archive-tar-minitar (0.5.2)
>>
>> bigdecimal (1.1.0)
>>
>> childprocess (0.3.9)
>>
>> columnize (0.3.6)
>>
>> commonwatir (4.0.0)
>>
>> dbd-mysql (0.4.4)
>>
>> dbi (0.4.5)
>>
>> deprecated (2.0.1)
>>
>> ffi (1.9.3 x86-mingw32)
>>
>> io-console (0.3)
>>
>> json (1.5.5)
>>
>> linecache19 (0.5.12)
>>
>> mini_magick (3.5.0)
>>
>> mini_portile (0.5.2)
>>
>> minitest (2.5.1)
>>
>> multi_json (1.8.2)
>>
>> mysql (2.9.1 x86-mingw32)
>>
>> needle (1.3.0)
>>
>> net-sftp (2.1.2)
>>
>> net-ssh (2.7.0)
>>
>> nokogiri (1.6.0 x86-mingw32)
>>
>> rake (0.9.2.2)
>>
>> rautomation (0.13.0)
>>
>> rbx-require-relative (0.0.9)
>>
>> rdoc (3.9.5)
>>
>> ruby_core_source (0.1.5)
>>
>> rubygems-update (2.1.11)
>>
>> rubyzip (1.0.0)
>>
>> selenium-webdriver (2.37.0)
>>
>> subexec (0.2.3)
>>
>> watir (5.0.0 x86-mingw32)
>>
>> watir-classic (4.0.1)
>>
>> watir-webdriver (0.6.4)
>>
>> websocket (1.0.7)
>>
>> win32-api (1.5.0 universal-mingw32)
>>
>> win32-process (0.7.4)
>>
>> win32screenshot (1.0.10)
>>
>> windows-api (0.4.2)
>>
>> windows-pr (1.2.2)
>>
>>  
>>
>>  
>>
>> I have two issue while using watir webdriver.
>>
>>  
>>
>> 1.Im trying to connect to mysql, but it throws me error [I 
>> already have libmysql.dll from version 6.0.0] :
>>
>>  
>>
>> Here is the my code in file sql.rb :
>>
>>  
>>
>> class Kmysql
>>
>> require 'rubygems'
>>
>> require "mysql"
>>
>> #require 'ruby-debug'
>>
>>  
>>
>> def connect_db
>>
>>  begin
>>
>>  @@host = "machine1"
>>
>>  @@user = "something"
>>
>>  @@password = "something"
>>
>>  @@schema = "testplan"
>>
>>   @@dbh = Mysql.real_connect(@@host,@@user,@@password,@@schema)
>>
>>  rescue Mysql::Error => e
>>
>>   puts "Error code: #{e.errno}"
>>
>>   puts "Error Message: #{e.error}"
>>
>>   puts "Error code: #{e.sqlstate}" if e.respond_to("sqlstate")
>>
>> end
>>
>> end
>>
>>  
>>
>> Then I using like this in another file to create a session :
>>
>>  
>>
>> require 'Lib/Common/sql'
>>
>> $db = Kmysql.new()
>>
>> $db.connect_db
>>
>>  
>>
>> But im getting error as :
>>
>>  
>>
>> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in
>>  
>> `r
>>
>> equire': cannot load such file -- mysql/mysql_api (LoadError)
>>
>> from 
>> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir
>>
>> e.rb:55:in `require'
>>
>> from 
>> C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql-2.9.1-x86-mingw32/lib/mys
>>
>> ql.rb:6:in `rescue in '
>>
>> from 
>> C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql-2.9.1-x86-mingw32/lib/mys
>>
>> ql.rb:2:in `'
>>
>> from 
>> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir
>>
>> e.rb:135:in `require'
>>
>> from 
>> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir
>>
>> e.rb:135:in `rescue in require'
>>
>> from 
>> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir
>>
>> e.rb:144:in `require'
>>
>>  
>>
>> So what im missing here?
>>
>>  
>>
>>  
>>
>> Second issue is about security certicate error, I want to bypass that , 
>> but it is not possible.
>>
>>  
>>
>> Is their any way I can bypass that.
>>
>>  
>>
>> I don’t have valid certificate for website now, but I want to complete 
>> automation.
>>
>>  
>>
>> With watir websriver, as soon as that warning comes, it just freezs and 
>> not even able to click on that wrning link “continue to website”.
>>
>>  
>>
>> So what is the solution for IE8 which im usng now?
>>
>>  
>>
>>  
>>
>> Can someone help me with these 2 queries.
>>
>>  
>>
>> Thanks
>>
>> Bhavesh
>>
>>  
>>
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[wtr-general] Re: help connecting to database

2013-12-23 Thread hillary
i don't know if you went with an active record solution, i just saw this 
thread, but i've been using the gem Sequel as part of my watir tests (
http://sequel.jeremyevans.net/) for a while now and found it has very good 
sqlserver support. I has a concept of models like AR, but for the most part 
i just run queries using it's dsl. It's also simple to connect to a db: 
require 'sequel' 
DB= Sequel.connect(
:adapter => 'ado',
:host =>server,
:database => db,
:user => 'user',
:password => password'
)

You can either use the dsl (DB[:table].where(:column => 
'value').select(:column, :column2) or just do raw sql queries (which  i do 
for for sproc execution mostly) (DB.fetch("exec Sproc_Name @param= 
:param", :param => 'value') do  |n|
  array << n[:name]
end)




On Tuesday, November 12, 2013 5:58:21 AM UTC-8, gary wrote:
>
> HI,
>
> Back in the days of Watir 1.8.6 it was fairly straightforward to connect 
> to your sql database using dbi and odbc which was packaged with the watir 
> installation. 
>
>
> require 'odbc' 
> require 'dbi'
> @dbconnect = 'DBI:ODBC:my odbc connection'
> @dbuser = 'username'
> @dbpass = 'password' 
>
> @dbh = DBI.connect(@dbconnect, @dbuser, @dbpass) 
>
> @sth = @dbh.prepare("select whatever from wherever i want")
> @sth.execute
>   @details = Array.new
>   @count = 0
>   while row=@sth.fetch do
>   @details[@count] = row.to_s
>   @count +=1
>   end
>   @totalrows = @count
> @sth.finish  
>
>
>
>
> The newer versions of watir  (2.1) don't appear to have anything packaged 
> to do this and I'm struggling with the mass of google groups, blogs etc to 
> keep up and figure out how to do this, not only is it all a mass of 
> confusion but nothing appears to install without being directed to yet 
> another gem to install, which often results in further gem installations, 
> so if anyone has any basic instructions they can post, preferably as close 
> to the odbc route i was previously using that would be greatly appreciated. 
> My good old trusty stuck in the dark ages of watir 1.8.6 still works a 
> treat but unfortunately the browser interaction does not ;-(
>
> Many thanks,  Gary
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[wtr-general] Re: Help for mysql connect and security warning in internet explorer ie8.

2013-12-05 Thread Super Kevy
And you did gem install mysql?



On Wednesday, December 4, 2013 2:33:59 AM UTC-6, Bhavesh wrote:
>
> Hi,
>
>  
>
> I have ruby 193 installed and have following gems on my machine :
>
>  
>
> *** LOCAL GEMS ***
>
>  
>
> archive-tar-minitar (0.5.2)
>
> bigdecimal (1.1.0)
>
> childprocess (0.3.9)
>
> columnize (0.3.6)
>
> commonwatir (4.0.0)
>
> dbd-mysql (0.4.4)
>
> dbi (0.4.5)
>
> deprecated (2.0.1)
>
> ffi (1.9.3 x86-mingw32)
>
> io-console (0.3)
>
> json (1.5.5)
>
> linecache19 (0.5.12)
>
> mini_magick (3.5.0)
>
> mini_portile (0.5.2)
>
> minitest (2.5.1)
>
> multi_json (1.8.2)
>
> mysql (2.9.1 x86-mingw32)
>
> needle (1.3.0)
>
> net-sftp (2.1.2)
>
> net-ssh (2.7.0)
>
> nokogiri (1.6.0 x86-mingw32)
>
> rake (0.9.2.2)
>
> rautomation (0.13.0)
>
> rbx-require-relative (0.0.9)
>
> rdoc (3.9.5)
>
> ruby_core_source (0.1.5)
>
> rubygems-update (2.1.11)
>
> rubyzip (1.0.0)
>
> selenium-webdriver (2.37.0)
>
> subexec (0.2.3)
>
> watir (5.0.0 x86-mingw32)
>
> watir-classic (4.0.1)
>
> watir-webdriver (0.6.4)
>
> websocket (1.0.7)
>
> win32-api (1.5.0 universal-mingw32)
>
> win32-process (0.7.4)
>
> win32screenshot (1.0.10)
>
> windows-api (0.4.2)
>
> windows-pr (1.2.2)
>
>  
>
>  
>
> I have two issue while using watir webdriver.
>
>  
>
> 1.Im trying to connect to mysql, but it throws me error [I 
> already have libmysql.dll from version 6.0.0] :
>
>  
>
> Here is the my code in file sql.rb :
>
>  
>
> class Kmysql
>
> require 'rubygems'
>
> require "mysql"
>
> #require 'ruby-debug'
>
>  
>
> def connect_db
>
>  begin
>
>  @@host = "machine1"
>
>  @@user = "something"
>
>  @@password = "something"
>
>  @@schema = "testplan"
>
>   @@dbh = Mysql.real_connect(@@host,@@user,@@password,@@schema)
>
>  rescue Mysql::Error => e
>
>   puts "Error code: #{e.errno}"
>
>   puts "Error Message: #{e.error}"
>
>   puts "Error code: #{e.sqlstate}" if e.respond_to("sqlstate")
>
> end
>
> end
>
>  
>
> Then I using like this in another file to create a session :
>
>  
>
> require 'Lib/Common/sql'
>
> $db = Kmysql.new()
>
> $db.connect_db
>
>  
>
> But im getting error as :
>
>  
>
> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in 
> `r
>
> equire': cannot load such file -- mysql/mysql_api (LoadError)
>
> from 
> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir
>
> e.rb:55:in `require'
>
> from 
> C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql-2.9.1-x86-mingw32/lib/mys
>
> ql.rb:6:in `rescue in '
>
> from 
> C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql-2.9.1-x86-mingw32/lib/mys
>
> ql.rb:2:in `'
>
> from 
> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir
>
> e.rb:135:in `require'
>
> from 
> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir
>
> e.rb:135:in `rescue in require'
>
> from 
> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir
>
> e.rb:144:in `require'
>
>  
>
> So what im missing here?
>
>  
>
>  
>
> Second issue is about security certicate error, I want to bypass that , 
> but it is not possible.
>
>  
>
> Is their any way I can bypass that.
>
>  
>
> I don’t have valid certificate for website now, but I want to complete 
> automation.
>
>  
>
> With watir websriver, as soon as that warning comes, it just freezs and 
> not even able to click on that wrning link “continue to website”.
>
>  
>
> So what is the solution for IE8 which im usng now?
>
>  
>
>  
>
> Can someone help me with these 2 queries.
>
>  
>
> Thanks
>
> Bhavesh
>
>  
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[wtr-general] Re: Help with ul class values

2013-08-05 Thread Chuck van der Linden
On Saturday, June 29, 2013 10:29:28 AM UTC-7, Fred Cassirer wrote:

> Hi,
>
> I have some page source that looks like:
>
>data-battery-level="5.71535">1 
>1 class="green">11  
> 
>
>
> I'm trying to get the value of 'data-battery-level' ...
>
>
> I have tried a number of different things, but I can't seem to find how to 
> pick out the value.
>
>
> b = Watir:Browser.new
>
> ...
>
> d = b.div :class => 'battery'
>
> d.text
>
> => "1\n1\n1\n1"
>
> >> d.ul
> => #"ul"}>
>
> >> d.elements
> => # @parent=# selector={:class=>"battery", :tag_name=>"div"}>>
> >> b.div(:class,"battery").li(:index,2).text
> => "1"
> >> b.div(:class,"battery-level-list")
> => # selector={:class=>"battery-level-list", :tag_name=>"div"}>
>
> I'm stumped ...
>
> Thanks in advance for any insight
> -Fred
>

The div is just an outer container, the ul (unordered list) tag inside the 
div is what has the attribute you want to get.  So you want to do something 
like

   b.ul(:class => 
"battery-level-list").attribute_value("data-battery-level") 

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[wtr-general] Re: Help with Javascript encoded ahref

2013-07-24 Thread Bashir Osman
Thank you very much johnssn this worked :D

On Tuesday, 23 July 2013 15:40:11 UTC-6, Bashir Osman wrote:
>
> Hi, 
>
> Little background - I'm planning on using Watir for a majority of our 
> automation. Currently we use Telerik Test Studio. 
>
> I'm unable to click on a shopping cart link using Watir, please check the 
> attachment for the syntax as Google Chrome would not allow me to copy it 
> into Notepad. 
>
> This is what I am currently using:  browser.link(:title, "$2.52").click  
>
> For situations like these what should I do? 
>
> Thanks!
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [wtr-general] Re: Help with Javascript encoded ahref

2013-07-24 Thread John Fitisoff
Try


browser.link(:text, "Start Browsing").when_present.click
browser.a(:title => "$2.52").when_present.click





 From: Bashir Osman 
To: watir-general@googlegroups.com 
Sent: Wednesday, July 24, 2013 9:08 AM
Subject: [wtr-general] Re: Help with Javascript encoded ahref
 


oops I think I may have sent you a private message:

require 'watir'
require 'watir-webdriver'

browser = Watir::Browser.new :ff
browser.goto "http://qat01.absorbcloud.com/ninja";

browser.link(:text, "Start Browsing").click
browser.a(:title => "$2.52").click

This is the code I am using, its almost idential to yours except I'm using :ff 
also a different URL but I don't think that has any affect since we are both 
automating the same page

This is the error I am currently getting:

in `assert_exists': unable to locate element, using {:text=>"Start Browsing", 
:tag_name=>"a"} (Watir::Exception::UnknownObjectException)




On Tuesday, 23 July 2013 15:40:11 UTC-6, Bashir Osman  wrote:
Hi, 
>
>
>Little background - I'm planning on using Watir for a majority of our 
>automation. Currently we use Telerik Test Studio. 
>
>
>I'm unable to click on a shopping cart link using Watir, please check the 
>attachment for the syntax as Google Chrome would not allow me to copy it into 
>Notepad. 
>
>
>This is what I am currently using:  browser.link(:title, "$2.52").click  
>
>
>
>For situations like these what should I do? 
>
>
>Thanks!
-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.
 
watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com
 
--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[wtr-general] Re: Help with Javascript encoded ahref

2013-07-24 Thread Bashir Osman
oops I think I may have sent you a private message:

require 'watir'
require 'watir-webdriver'

browser = Watir::Browser.new :ff
browser.goto "http://qat01.absorbcloud.com/ninja";

browser.link(:text, "Start Browsing").click
browser.a(:title => "$2.52").click

This is the code I am using, its almost idential to yours except I'm using 
:ff also a different URL but I don't think that has any affect since we are 
both automating the same page

This is the error I am currently getting:

in `assert_exists': unable to locate element, using {:text=>"Start 
Browsing", :tag_name=>"a"} (Watir::Exception::UnknownObjectException)



On Tuesday, 23 July 2013 15:40:11 UTC-6, Bashir Osman wrote:
>
> Hi, 
>
> Little background - I'm planning on using Watir for a majority of our 
> automation. Currently we use Telerik Test Studio. 
>
> I'm unable to click on a shopping cart link using Watir, please check the 
> attachment for the syntax as Google Chrome would not allow me to copy it 
> into Notepad. 
>
> This is what I am currently using:  browser.link(:title, "$2.52").click  
>
> For situations like these what should I do? 
>
> Thanks!
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[wtr-general] Re: Help needed for using regular expressions

2013-03-18 Thread Pavan Turlapati
Thanks a lot Sir(s),  for the detailed description along with the solution, 
it worked like charm.


On Monday, March 18, 2013 1:10:30 PM UTC-5, Chuck van der Linden wrote:
>
> On Monday, March 18, 2013 11:03:09 AM UTC-7, Pavan Turlapati wrote:
>>
>> Hi All,
>>  I have a statement as shown below
>> $ie.iframe(:id => 'PWGadget3Ifr').table(:id => 
>> "ViewTable").cell(:text=>"VMO").fire_event("ondblclick")
>>
>> In the above statement, the value 3 in the word 'PWGadget3Ifr' is not 
>> always unique and it can change to any number from [0-9]. So I need help to 
>> convert the above statement into a regular expression statement.
>>
>> I have also tried the below statement, but it is giving me the error 
>> $ie.iframe(:id =>PWGadget/\d/Ifr).table(:id => 
>> "ViewTable").cell(:text=>"VMO").fire_event("ondblclick")
>>
>> SyntaxError: (irb):61: syntax error, unexpected $undefined
>> $ie.iframe(:id =>PWGadget/\d/Ifr).table(:id => "ViewTabl...
>>^
>> (irb):61: syntax error, unexpected ')', expecting $end
>> ...e.iframe(:id =>PWGadget/\d/Ifr).table(:id => "ViewTable").ce...
>> ...   ^
>> from C:/Ruby193/bin/irb:12:in `'
>> irb(main):062:0>
>>
>>
>> Any help is highy appreciated.
>>
>
> You need / at the beginning and end (in place of ") of the entire 
> expression to indicate that you are using a regex.  Ruby see's PWGa and 
> presumes that is some kind of a constant or class name, then gets confused 
> by the / in the middle of the name.   You need the / at the front, so it 
> see's that entire thing as a regular expression.
>
> Try 
>
>   $ie.iframe(:id =>/PWGadget\dIfr/).table(:id => 
> "ViewTable").cell(:text=>"VMO").fire_event("ondblclick")
>
>  
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[wtr-general] Re: Help needed for using regular expressions

2013-03-18 Thread Chuck van der Linden
On Monday, March 18, 2013 11:03:09 AM UTC-7, Pavan Turlapati wrote:
>
> Hi All,
>  I have a statement as shown below
> $ie.iframe(:id => 'PWGadget3Ifr').table(:id => 
> "ViewTable").cell(:text=>"VMO").fire_event("ondblclick")
>
> In the above statement, the value 3 in the word 'PWGadget3Ifr' is not 
> always unique and it can change to any number from [0-9]. So I need help to 
> convert the above statement into a regular expression statement.
>
> I have also tried the below statement, but it is giving me the error 
> $ie.iframe(:id =>PWGadget/\d/Ifr).table(:id => 
> "ViewTable").cell(:text=>"VMO").fire_event("ondblclick")
>
> SyntaxError: (irb):61: syntax error, unexpected $undefined
> $ie.iframe(:id =>PWGadget/\d/Ifr).table(:id => "ViewTabl...
>^
> (irb):61: syntax error, unexpected ')', expecting $end
> ...e.iframe(:id =>PWGadget/\d/Ifr).table(:id => "ViewTable").ce...
> ...   ^
> from C:/Ruby193/bin/irb:12:in `'
> irb(main):062:0>
>
>
> Any help is highy appreciated.
>

You need / at the beginning and end (in place of ") of the entire 
expression to indicate that you are using a regex.  Ruby see's PWGa and 
presumes that is some kind of a constant or class name, then gets confused 
by the / in the middle of the name.   You need the / at the front, so it 
see's that entire thing as a regular expression.

Try 

  $ie.iframe(:id =>/PWGadget\dIfr/).table(:id => 
"ViewTable").cell(:text=>"VMO").fire_event("ondblclick")

 

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[wtr-general] Re: help please

2013-02-06 Thread Alex Shtayer

Maybe, you can try
browser.div(:*id, "idDiv_PWD_UsernameExample"*).send_keys "blah-blah"
or 
browser.div(:*id, "idDiv_PWD_UsernameExample"*).click
browser.send_keys "blah-blah"

That solution works for me perfectly (for text in divs)

On Saturday, February 2, 2013 8:19:11 PM UTC+2, mc060200778 wrote:
>
> Hi,
>
> my question is how to set value in the textbox with following html code 
>
> * aria-hidden="true" style="cursor: text;">som...@example.com 
> *
>
>
>
> *1st:*
> @browser = Watir::Browser.new :chrome 
> @browser.div(:id => "idDiv_PWD_UsernameExample").set 
> 'te...@test.com
> '
>
> *2nd:*
> @browser = Watir::Browser.new :chrome 
> @browser.text_field(:id => "idDiv_PWD_UsernameExample").set ("
> te...@test.com ")
>
>
> *3rd:*
> @browser = Watir::Browser.new :chrome 
> @browser.div(:class => "*placeholder ltr_override*").set 
> ("te...@test.com
> ")
>
>
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[wtr-general] Re: help please

2013-02-05 Thread prathyusha rupakula

hi
 
i suggest using "id" attribute without "any quotes" for name needed in the 
text field and a comma separator instead on=>.

example
browser.text_field(:id,"idDiv_PWD_UsernameExample").set te...@test.com





On Saturday, February 2, 2013 11:49:11 PM UTC+5:30, mc060200778 wrote:
>
> Hi,
>
> my question is how to set value in the textbox with following html code 
>
> * aria-hidden="true" style="cursor: text;">som...@example.com 
> *
>
>
>
> *1st:*
> @browser = Watir::Browser.new :chrome 
> @browser.div(:id => "idDiv_PWD_UsernameExample").set 
> 'te...@test.com
> '
>
> *2nd:*
> @browser = Watir::Browser.new :chrome 
> @browser.text_field(:id => "idDiv_PWD_UsernameExample").set ("
> te...@test.com ")
>
>
> *3rd:*
> @browser = Watir::Browser.new :chrome 
> @browser.div(:class => "*placeholder ltr_override*").set 
> ("te...@test.com
> ")
>
>
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[wtr-general] Re: Help on Watir scripts

2011-08-12 Thread Super Kevy
Cut my self off to quick.

http://w3schools.com/tags/tag_link.asp
The  tag:   must appear in the head not the body of html
document
Example Link to an external style sheet:



When used for style sheets, the  tag is supported in all major
browsers. No real support for anything else.

Why is development abusing the html structure by putting  into
the body?


On Aug 12, 8:34 am, Super Kevy  wrote:
> just what is the element link its not the html element anchor  href=...>Stuff.
> That would explain it.
>  
>
> Consider element_by_xpath
> Try these links for some 
> info:http://wiki.openqa.org/display/WTR/XPathhttp://angrez.blogspot.com/2006/06/xpath-and-watir.html
>
> Consider refreshing what makes up html:  http://w3schools.com/html/default.asp
>
> On Aug 11, 3:34 am, Jog  wrote:
>
>
>
> > Hi,
>
> > I am new to Watir and I would like to ask if there is any way in Watir
> > to access the elements in a partial view?
> > The element does not exist when you look into the page's View Source.
> > It does, however, exist when you look into the firebug.
>
> > Here's my Page Source looks like..
> >  
> >              > style="height:522px;">
> >                       ---some elements not shown here---
> >             
> > 
>
> > Here's what in the DOM..
> > 
> >              > style="height:522px;">
> >                       
> >                       
> >                       ---some parts here---
> >             
> > 
>
> > Somehow, I want to access the links in the DOM..
>
> > by the way here's my WATIR script and it fails..
>
> > require 'watir'
> > test_site = 'https://www.mysite.com'
> > ie = Watir::IE.new
> > ie.goto(test_site)
> > ie.link(:text, "User Management").click
> > if assert(ie.link(:id, "pathSearch").exists?)
> >         puts 'OK'
> > end
>
> > then i get this message from WATIR..
> >   1) Failure:
> > test_user_mgt(TC_TOM_suite) [TOM_test_suite.rb:42]:
> > Failed assertion, no message given.
>
> > it seems that WATIR did not see the links element under div because
> > they are part of a partial view..
> > I need advice in this one..
>
> > Thank you very much!
>
> > Best Regards,
> > Jog- Hide quoted text -
>
> - Show quoted text -

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Help on Watir scripts

2011-08-12 Thread Super Kevy
just what is the element link its not the html element anchor Stuff.
That would explain it.


Consider element_by_xpath
Try these links for some info:
http://wiki.openqa.org/display/WTR/XPath
http://angrez.blogspot.com/2006/06/xpath-and-watir.html

Consider refreshing what makes up html:   http://w3schools.com/html/default.asp



On Aug 11, 3:34 am, Jog  wrote:
> Hi,
>
> I am new to Watir and I would like to ask if there is any way in Watir
> to access the elements in a partial view?
> The element does not exist when you look into the page's View Source.
> It does, however, exist when you look into the firebug.
>
> Here's my Page Source looks like..
>  
>              style="height:522px;">
>                       ---some elements not shown here---
>             
> 
>
> Here's what in the DOM..
> 
>              style="height:522px;">
>                       
>                       
>                       ---some parts here---
>             
> 
>
> Somehow, I want to access the links in the DOM..
>
> by the way here's my WATIR script and it fails..
>
> require 'watir'
> test_site = 'https://www.mysite.com'
> ie = Watir::IE.new
> ie.goto(test_site)
> ie.link(:text, "User Management").click
> if assert(ie.link(:id, "pathSearch").exists?)
>         puts 'OK'
> end
>
> then i get this message from WATIR..
>   1) Failure:
> test_user_mgt(TC_TOM_suite) [TOM_test_suite.rb:42]:
> Failed assertion, no message given.
>
> it seems that WATIR did not see the links element under div because
> they are part of a partial view..
> I need advice in this one..
>
> Thank you very much!
>
> Best Regards,
> Jog

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Help with select_no_wait

2011-01-20 Thread watirboy
Thanks Jarmo...I dont know why I didnt even look at this! I feel like
a dunce

Everyone on this group is the best!!!

On Jan 20, 7:34 am, Jarmo Pertman  wrote:
> Maybe this post helps you to avoid the 
> popup:http://watir.com/2011/01/14/testing-webpages-with-javascript-popups-c...
>
> Jarmo Pertman
> -
> IT does really matter -http://www.itreallymatters.net
>
> On Jan 18, 9:44 pm, watirboy  wrote:
>
> > Hey Jarmo,
>
> > When my script selects an option, a javascript pop-up shows up. WATIR
> > is stuck at this point, and cannot move since it is waiting for
> > something in the list element (possibly closing said pop-up).
>
> > Do you have another idea? I tried throwing a thread up with AutoIt,
> > but for some odd reason it wasnt working...
>
> > On Jan 18, 1:53 pm, Jarmo Pertman  wrote:
>
> > > It should be probably in the SelectList class. But why do you need it
> > > anyway? Can't you solve the problem somehow differently?
>
> > > Jarmo Pertman
> > > -
> > > IT does really matter -http://www.itreallymatters.net
>
> > > On Jan 17, 11:34 pm, watirboy  wrote:
>
> > > > Hey Guys,
>
> > > > I have been reading up on possibly patching my WATIR installation with
> > > > a select_no_wait function (similar to click_no_wait) but I have no
> > > > idea where I should place this. When I put it in lib/watir/element.rb
> > > > I get the following error:
>
> > > > Fast Debugger (ruby-debug-ide 0.4.16, ruby-debug-base 0.10.4) listens
> > > > on 127.0.0.1:1157
> > > > Loaded suite C:\code\watir\scripts\testcase
> > > > Started
> > > > E
> > > > Finished in 9.582906 seconds.
>
> > > >   1) Error:
> > > > test_01(TestCase):
> > > > NoMethodError: undefined method `eval_in_spawned_process' for
> > > > #
> > > >     C:/ruby/lib/ruby/gems/1.8/gems/watir-1.7.1/lib/watir/element.rb:
> > > > 358:in `select_no_wait'
> > > >     C:\code\watir\scripts\testcase.rb:55:in `test_01'
>
> > > > 1 tests, 0 assertions, 0 failures, 1 errors
>
> > > > and this is the code I entered:
>
> > > > module Watir
> > > >     class Element
> > > >         # ... the rest of Element code above here...
> > > >         def select_no_wait(item)
> > > >             assert_enabled
> > > >             highlight(:set)
> > > >             object =
> > > > "#{self.class}.new(self, :unique_number,#{self.unique_number})"
> > > >             @page_container.eval_in_spawned_process(object +
> > > > ".select('#{item}')")
> > > >             highlight(:clear)
> > > >         end
> > > >     end
> > > > end

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Help with select_no_wait

2011-01-20 Thread Jarmo Pertman
Maybe this post helps you to avoid the popup:
http://watir.com/2011/01/14/testing-webpages-with-javascript-popups-correctly/

Jarmo Pertman
-
IT does really matter - http://www.itreallymatters.net


On Jan 18, 9:44 pm, watirboy  wrote:
> Hey Jarmo,
>
> When my script selects an option, a javascript pop-up shows up. WATIR
> is stuck at this point, and cannot move since it is waiting for
> something in the list element (possibly closing said pop-up).
>
> Do you have another idea? I tried throwing a thread up with AutoIt,
> but for some odd reason it wasnt working...
>
> On Jan 18, 1:53 pm, Jarmo Pertman  wrote:
>
>
>
>
>
>
>
> > It should be probably in the SelectList class. But why do you need it
> > anyway? Can't you solve the problem somehow differently?
>
> > Jarmo Pertman
> > -
> > IT does really matter -http://www.itreallymatters.net
>
> > On Jan 17, 11:34 pm, watirboy  wrote:
>
> > > Hey Guys,
>
> > > I have been reading up on possibly patching my WATIR installation with
> > > a select_no_wait function (similar to click_no_wait) but I have no
> > > idea where I should place this. When I put it in lib/watir/element.rb
> > > I get the following error:
>
> > > Fast Debugger (ruby-debug-ide 0.4.16, ruby-debug-base 0.10.4) listens
> > > on 127.0.0.1:1157
> > > Loaded suite C:\code\watir\scripts\testcase
> > > Started
> > > E
> > > Finished in 9.582906 seconds.
>
> > >   1) Error:
> > > test_01(TestCase):
> > > NoMethodError: undefined method `eval_in_spawned_process' for
> > > #
> > >     C:/ruby/lib/ruby/gems/1.8/gems/watir-1.7.1/lib/watir/element.rb:
> > > 358:in `select_no_wait'
> > >     C:\code\watir\scripts\testcase.rb:55:in `test_01'
>
> > > 1 tests, 0 assertions, 0 failures, 1 errors
>
> > > and this is the code I entered:
>
> > > module Watir
> > >     class Element
> > >         # ... the rest of Element code above here...
> > >         def select_no_wait(item)
> > >             assert_enabled
> > >             highlight(:set)
> > >             object =
> > > "#{self.class}.new(self, :unique_number,#{self.unique_number})"
> > >             @page_container.eval_in_spawned_process(object +
> > > ".select('#{item}')")
> > >             highlight(:clear)
> > >         end
> > >     end
> > > end

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Help with select_no_wait

2011-01-18 Thread watirboy
Hey Jarmo,

When my script selects an option, a javascript pop-up shows up. WATIR
is stuck at this point, and cannot move since it is waiting for
something in the list element (possibly closing said pop-up).

Do you have another idea? I tried throwing a thread up with AutoIt,
but for some odd reason it wasnt working...

On Jan 18, 1:53 pm, Jarmo Pertman  wrote:
> It should be probably in the SelectList class. But why do you need it
> anyway? Can't you solve the problem somehow differently?
>
> Jarmo Pertman
> -
> IT does really matter -http://www.itreallymatters.net
>
> On Jan 17, 11:34 pm, watirboy  wrote:
>
> > Hey Guys,
>
> > I have been reading up on possibly patching my WATIR installation with
> > a select_no_wait function (similar to click_no_wait) but I have no
> > idea where I should place this. When I put it in lib/watir/element.rb
> > I get the following error:
>
> > Fast Debugger (ruby-debug-ide 0.4.16, ruby-debug-base 0.10.4) listens
> > on 127.0.0.1:1157
> > Loaded suite C:\code\watir\scripts\testcase
> > Started
> > E
> > Finished in 9.582906 seconds.
>
> >   1) Error:
> > test_01(TestCase):
> > NoMethodError: undefined method `eval_in_spawned_process' for
> > #
> >     C:/ruby/lib/ruby/gems/1.8/gems/watir-1.7.1/lib/watir/element.rb:
> > 358:in `select_no_wait'
> >     C:\code\watir\scripts\testcase.rb:55:in `test_01'
>
> > 1 tests, 0 assertions, 0 failures, 1 errors
>
> > and this is the code I entered:
>
> > module Watir
> >     class Element
> >         # ... the rest of Element code above here...
> >         def select_no_wait(item)
> >             assert_enabled
> >             highlight(:set)
> >             object =
> > "#{self.class}.new(self, :unique_number,#{self.unique_number})"
> >             @page_container.eval_in_spawned_process(object +
> > ".select('#{item}')")
> >             highlight(:clear)
> >         end
> >     end
> > end

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Help with select_no_wait

2011-01-18 Thread Jarmo Pertman
It should be probably in the SelectList class. But why do you need it
anyway? Can't you solve the problem somehow differently?

Jarmo Pertman
-
IT does really matter - http://www.itreallymatters.net

On Jan 17, 11:34 pm, watirboy  wrote:
> Hey Guys,
>
> I have been reading up on possibly patching my WATIR installation with
> a select_no_wait function (similar to click_no_wait) but I have no
> idea where I should place this. When I put it in lib/watir/element.rb
> I get the following error:
>
> Fast Debugger (ruby-debug-ide 0.4.16, ruby-debug-base 0.10.4) listens
> on 127.0.0.1:1157
> Loaded suite C:\code\watir\scripts\testcase
> Started
> E
> Finished in 9.582906 seconds.
>
>   1) Error:
> test_01(TestCase):
> NoMethodError: undefined method `eval_in_spawned_process' for
> #
>     C:/ruby/lib/ruby/gems/1.8/gems/watir-1.7.1/lib/watir/element.rb:
> 358:in `select_no_wait'
>     C:\code\watir\scripts\testcase.rb:55:in `test_01'
>
> 1 tests, 0 assertions, 0 failures, 1 errors
>
> and this is the code I entered:
>
> module Watir
>     class Element
>         # ... the rest of Element code above here...
>         def select_no_wait(item)
>             assert_enabled
>             highlight(:set)
>             object =
> "#{self.class}.new(self, :unique_number,#{self.unique_number})"
>             @page_container.eval_in_spawned_process(object +
> ".select('#{item}')")
>             highlight(:clear)
>         end
>     end
> end

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


答复: [wtr-general] Re: HELP: FunFX + Watir not ru nning in windowsXP:OLE error code:80020101 in

2010-12-20 Thread liu . libo
Thank you, I already created a new topic in FunFX group. if had some new 
info for this i will copy it to here  too.





Chuck van der Linden 
发件人: watir-general@googlegroups.com


2010-12-21 03:15
请答复 给 watir-general
 
收件人:Watir General 
抄送: 
主题:  [wtr-general] Re: HELP: FunFX + Watir not running in 
windowsXP:OLE error code:80020101 in 


ok so wait, Dave, that was from two years ago, saying they didn't
support IE, but were hoping to fix that bug as soon as possible..  so
does that link reflect the current state?

In any event all the errors I see there appear to be pointing into the
FunFX code, and not at any of the Watir code, so it would seem this is
really an issue to take to the FunFX group.

On Dec 20, 8:08 am, Dave McNulla  wrote:
> http://groups.google.com/group/funfx/browse_thread/thread/808ec990511...
> Sorry, I didn't research it more.
>
> Dave
>
> On Dec 19, 7:45 pm, liu.l...@zte.com.cn wrote:
>
>
>
> > HELP: FunFX + Watir not running in windowsXP:OLE error code:80020101 
in
> > 
>
> > Hello everybody, sorry for my poor english.
> > I want to use the FunFX + Watir to test the Flex WEB applications in
> > Windows,
> > and the browser is IE7. But when the flex_app object call some method, 
it
> > will
> > give some error info.
>
> > My system info:
>
> > WinXP SP3
> > ruby 1.8.7
> > watir 1.6.7
> > funfx 0.2.2
>
> > my test sample is :
>
> > require 'rubygems'
> > require 'test/unit'
> > require 'funfx'
> > require 'funfx/browser/watir'
>
> > class AccordionTest < Test::Unit::TestCase
>
> > @ie = Watir::IE.new()
>
> > @ie.goto("
http://funfx.rubyforge.org/Flex/FlexObjectTest/FlexObjectTest.html";)
> > @flex = @ie.flex_app("FlexObjectTest","FlexObjectTest")
> > puts @flex.methods
>
> > tree = @flex.tree(:id=>'treeData').open(:item_renderer,"Container
> > controls")
>
> > end
>
> > run with this watir.rb:
>
> > output log:>ruby accordion_test.rb
>
> > 
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:25 
:in
> > `method_missing': unknown property or method `fireFunFXEvent'
> > (WIN32OLERuntimeError)
> > HRESULT error code:0x80020006
> >   未知名称。
> > from
> > 
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:25 
:in
> > `fire_event'
> > from
> > 
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:27: 
in
> > `fire_event'
> > from
> > 
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:55: 
in
> > `flex_invoke'
> > from
> > 
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:26: 
in
> > `fire_event'
> > from
> > 
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/elements.rb:10 
87:in
> > `open'
> > from accordion_test.rb:14
> > to_yaml_style
> > before_text
> > horizontal_list
> > labels
> > set_container
> > bar_chart
> > ...
>
> > i searched in the funfx group and found a method to change the 
watir.rb to
> > test this, but
> > it give the error info :
>
> >  run with this watir.rb:
>
> > >ruby accordion_test.rb
>
> > 
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:41 
:in
> > `method_missing': execScript (WIN32OLERuntimeError)
> > OLE error code:80020101 in 
> >   ��变虹�伴��璇� 80020101 ���瀵艰�存�ら」���浣娉�瀹� 
EURO?
> > HRESULT error code:0x80020009
> >   发生意外。
> > from
> > 
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:41 
:in
> > `exec_script'
> > from
> > 
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:23 
:in
> > `fire_event'
> > from
> > 
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:27: 
in
> > `fire_event'
> > from
> > 
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:55: 
in
> > `flex_invoke'
> > from
> > 
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:26: 
in
> > `fire_event'
> > from
> > 
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/elements.rb:10 
87:in
> > `open'
> > from accordion_test.rb:14
> > typingspeed=
> > to_yaml_style
> > prese

[wtr-general] Re: HELP: FunFX + Watir not running in windowsXP:OLE error code:80020101 in

2010-12-20 Thread Chuck van der Linden
ok so wait, Dave, that was from two years ago, saying they didn't
support IE, but were hoping to fix that bug as soon as possible..  so
does that link reflect the current state?

In any event all the errors I see there appear to be pointing into the
FunFX code, and not at any of the Watir code, so it would seem this is
really an issue to take to the FunFX group.

On Dec 20, 8:08 am, Dave McNulla  wrote:
> http://groups.google.com/group/funfx/browse_thread/thread/808ec990511...
> Sorry, I didn't research it more.
>
> Dave
>
> On Dec 19, 7:45 pm, liu.l...@zte.com.cn wrote:
>
>
>
> > HELP: FunFX + Watir not running in windowsXP:OLE error code:80020101 in
> > 
>
> > Hello everybody, sorry for my poor english.
> > I want to use the FunFX + Watir to test the Flex WEB applications in
> > Windows,
> > and the browser is IE7. But when the flex_app object call some method, it
> > will
> > give some error info.
>
> > My system info:
>
> > WinXP SP3
> > ruby 1.8.7
> > watir 1.6.7
> > funfx 0.2.2
>
> > my test sample is :
>
> > require 'rubygems'
> > require 'test/unit'
> > require 'funfx'
> > require 'funfx/browser/watir'
>
> > class AccordionTest < Test::Unit::TestCase
>
> > @ie = Watir::IE.new()
>
> > @ie.goto("http://funfx.rubyforge.org/Flex/FlexObjectTest/FlexObjectTest.html";)
> > @flex = @ie.flex_app("FlexObjectTest","FlexObjectTest")
> > puts @flex.methods
>
> > tree = @flex.tree(:id=>'treeData').open(:item_renderer,"Container
> > controls")
>
> > end
>
> > run with this watir.rb:
>
> > output log:>ruby accordion_test.rb
>
> > C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:25 
> > :in
> > `method_missing': unknown property or method `fireFunFXEvent'
> > (WIN32OLERuntimeError)
> > HRESULT error code:0x80020006
> >   未知名称。
> > from
> > C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:25 
> > :in
> > `fire_event'
> > from
> > C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:27: 
> > in
> > `fire_event'
> > from
> > C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:55: 
> > in
> > `flex_invoke'
> > from
> > C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:26: 
> > in
> > `fire_event'
> > from
> > C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/elements.rb:10 
> > 87:in
> > `open'
> > from accordion_test.rb:14
> > to_yaml_style
> > before_text
> > horizontal_list
> > labels
> > set_container
> > bar_chart
> > ...
>
> > i searched in the funfx group and found a method to change the watir.rb to
> > test this, but
> > it give the error info :
>
> >  run with this watir.rb:
>
> > >ruby accordion_test.rb
>
> > C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:41 
> > :in
> > `method_missing': execScript (WIN32OLERuntimeError)
> > OLE error code:80020101 in 
> >   ��变虹�伴��璇� 80020101 ���瀵艰�存�ら」���浣娉�瀹� EURO?
> > HRESULT error code:0x80020009
> >   发生意外。
> > from
> > C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:41 
> > :in
> > `exec_script'
> > from
> > C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:23 
> > :in
> > `fire_event'
> > from
> > C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:27: 
> > in
> > `fire_event'
> > from
> > C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:55: 
> > in
> > `flex_invoke'
> > from
> > C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:26: 
> > in
> > `fire_event'
> > from
> > C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/elements.rb:10 
> > 87:in
> > `open'
> > from accordion_test.rb:14
> > typingspeed=
> > to_yaml_style
> > present?
> > ..
>
> > i checked the watir.rb file, and maybe this
>
> > @ole_obj.ie.Document.parentWindow.execScript(js)
>
> > execScript method not defined? someone can help me how to resolve this
> > problem?
>
> > 
> > ZTE Information Security Notice: The information contained in this mail is 
> > solely property of the sender's organization. This mail communication is 
> > confidential. Recipients named above are obligated to maintain secrecy and 
> > are not permitted to disclose the contents of this communication to others.
> > This email and any files transmitted with it are confidential and intended 
> > solely for the use of the individual or entity to whom they are addressed. 
> > If you have received this email in error please notify the originator of 
> > the message. Any views expressed in this message are those of the 
> > individual sender.
> > This message has been scanned for viruses and Spam by ZTE Anti-Spam system.
>
> >  watir_bak.rb
> > 1KViewDownload
>
> >  watir.rb
> > 3KViewDownload- Hide quoted text -
>
> - Show quoted text -

-- 
Before post

[wtr-general] Re: Help: File Size defining with Cucumber Watir.

2010-12-20 Thread Chuck van der Linden
Why not do it as a scenario outline, Then in the examples specify two
or more filenames that point to files of known size that allow you to
explore the boundaries

You could for readability even include the size of the files in the
feature, but just ignore it other than paying attention to it when
creating the test data.

It's harder for me to be specific without seeing your UI, but I'd be
thinking of somethign along these lines

As the site administrator
I want to limit users to uploading avatar image files of size 50K or
less
to keep the size of avatars reasonable and keep the db space used by
BLOB's under control.

 Scenario Outline
Given I am logged in as a normal user
and I am on the user profile upload avatar page
When I select logo file  for uploading as my avatar
Then I should  that the file is too large
And the uploadbutton should be 

 Examples
|filename|size|warningstatus|buttonstatus|
|logo1|48K|not see a warning|enabled|
|logo2|49.99K|not see a warning|enabled|
|logo3|50K|not see a warning|enabled|
|logo4|50.001K|be given a warning|disabled|
|logo5|51K|be given a warning|disabled|
|logo6|500K|be given a warning|disabled|
|logo7|500M|be given a warning|disabled|

I have not tried this, but I think it should work.  if you had to
actually pass in the size, to not have an error in the feature, then
you could just ignore it in the step.

Alternatively you could just use filenames that make the intent
clear.. 'logotest_49_99K', which might be even simpler and I wish it
had occured to me before I finished composing the example above :-)


On Dec 19, 10:40 am, Irfan Ahmed  wrote:
> Hi, Jarmo Pertman,
> Thanks for your response. Actually there was a problem to find out a file
> size for upload. Becuase, I need to know if the file size is more then
> "something" then the system will display a message "xcvbnnm". Look at the
> step generated by cucumber:
> *Given /^I have selected a logo "([^"]*)" of size (\d+) MB$/ do |arg1, arg2|
> *
> *  browser.file_field(:name, "file").set(arg1)*
> *end*
> *
> this step will be passed if size of image file arg2 is the size equal to
> arg1.
>
> the file there I set (**browser.file_field(:name, "file").set(arg1)) too
> upload a picture, I need to write a code to show that the file has a size of
> minimum requirement and so that I need to findout the size of that. So here
> I need to know how know a size of a picture or any file which are taken to
> upload.
> *
>
>
>
>
>
> On Sun, Dec 19, 2010 at 6:24 PM, Jarmo Pertman  wrote:
> > I didn't understand what's the exact problem. Could you be more
> > specific what you'd want to exactly do?
>
> > Jarmo Pertman
> > -
> > IT does really matter -http://www.itreallymatters.net
>
> > On Dec 19, 5:02 am, Irfan Ahmed  wrote:
> > > Hi,
> > > I am working for automation with Cucumber and watir in a software
> > company.
> > > I have a problem while working  windows component for uploading I need to
> > do
> > > the following:
>
> > > *Given /^I have selected a logo "([^"]*)" of size (\d+) MB$/ do |arg1,
> > arg2|
> > > *
> > > *  browser.file_field(:name, "file").set(arg1)*
> > > *end*
> > > *
> > > *
> > > But, I am having problem to get to the file size to pass this test. I
> > need
> > > to compare the file size with the given size.
>
> > > Anybody, please help me as soon as possible.
>
> > > --
> > > Thanks,
> > > Irfan Ahmed Rizvi (Sagar)
>
> > > cell Numbers:
> > > +880 1676  246  991
> > > +880 1723  712  888
>
> > > Tasawr Interactive 
>
> > --
> > Before posting, please readhttp://watir.com/support. In short: search
> > before you ask, be nice.
>
> > watir-general@googlegroups.com
> >http://groups.google.com/group/watir-general
> > watir-general+unsubscr...@googlegroups.com
>
> --
> Thanks,
> Irfan Ahmed Rizvi (Sagar)
>
> cell Numbers:
> +880 1676  246  991
> +880 1723  712  888
>
> http://www.welltreat.ushttp://restaurant.welltreat.us/http://isp.welltreat.us/-
>  Hide quoted text -
>
> - Show quoted text -

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: HELP: FunFX + Watir not running in windowsXP:OLE error code:80020101 in

2010-12-20 Thread Dave McNulla
http://groups.google.com/group/funfx/browse_thread/thread/808ec99051128e62
Sorry, I didn't research it more.

Dave

On Dec 19, 7:45 pm, liu.l...@zte.com.cn wrote:
> HELP: FunFX + Watir not running in windowsXP:OLE error code:80020101 in
> 
>
> Hello everybody, sorry for my poor english.
> I want to use the FunFX + Watir to test the Flex WEB applications in
> Windows,
> and the browser is IE7. But when the flex_app object call some method, it
> will
> give some error info.
>
> My system info:
>
> WinXP SP3
> ruby 1.8.7
> watir 1.6.7
> funfx 0.2.2
>
> my test sample is :
>
> require 'rubygems'
> require 'test/unit'
> require 'funfx'
> require 'funfx/browser/watir'
>
> class AccordionTest < Test::Unit::TestCase
>
> @ie = Watir::IE.new()
>
> @ie.goto("http://funfx.rubyforge.org/Flex/FlexObjectTest/FlexObjectTest.html";)
> @flex = @ie.flex_app("FlexObjectTest","FlexObjectTest")
> puts @flex.methods
>
> tree = @flex.tree(:id=>'treeData').open(:item_renderer,"Container
> controls")
>
> end
>
> run with this watir.rb:
>
> output log:>ruby accordion_test.rb
>
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:25 
> :in
> `method_missing': unknown property or method `fireFunFXEvent'
> (WIN32OLERuntimeError)
> HRESULT error code:0x80020006
>   未知名称。
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:25 
> :in
> `fire_event'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:27: in
> `fire_event'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:55: in
> `flex_invoke'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:26: in
> `fire_event'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/elements.rb:10 
> 87:in
> `open'
> from accordion_test.rb:14
> to_yaml_style
> before_text
> horizontal_list
> labels
> set_container
> bar_chart
> ...
>
> i searched in the funfx group and found a method to change the watir.rb to
> test this, but
> it give the error info :
>
>  run with this watir.rb:
>
> >ruby accordion_test.rb
>
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:41 
> :in
> `method_missing': execScript (WIN32OLERuntimeError)
> OLE error code:80020101 in 
>   ��变虹�伴��璇� 80020101 ���瀵艰�存�ら」���浣娉�瀹� EURO?
> HRESULT error code:0x80020009
>   发生意外。
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:41 
> :in
> `exec_script'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:23 
> :in
> `fire_event'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:27: in
> `fire_event'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:55: in
> `flex_invoke'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:26: in
> `fire_event'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/elements.rb:10 
> 87:in
> `open'
> from accordion_test.rb:14
> typingspeed=
> to_yaml_style
> present?
> ..
>
> i checked the watir.rb file, and maybe this
>
> @ole_obj.ie.Document.parentWindow.execScript(js)
>
> execScript method not defined? someone can help me how to resolve this
> problem?
>
> 
> ZTE Information Security Notice: The information contained in this mail is 
> solely property of the sender's organization. This mail communication is 
> confidential. Recipients named above are obligated to maintain secrecy and 
> are not permitted to disclose the contents of this communication to others.
> This email and any files transmitted with it are confidential and intended 
> solely for the use of the individual or entity to whom they are addressed. If 
> you have received this email in error please notify the originator of the 
> message. Any views expressed in this message are those of the individual 
> sender.
> This message has been scanned for viruses and Spam by ZTE Anti-Spam system.
>
>  watir_bak.rb
> 1KViewDownload
>
>  watir.rb
> 3KViewDownload

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: HELP: FunFX + Watir not running in windowsXP:OLE error code:80020101 in

2010-12-20 Thread Dave McNulla
I experimented with FunFX and Watir a few weeks back. If I recall
correctly, there was a bug that prevented using IE. I will look back
at my browser history to see if I can find the websites with the
issues documented.

Dave

On Dec 19, 7:45 pm, liu.l...@zte.com.cn wrote:
> HELP: FunFX + Watir not running in windowsXP:OLE error code:80020101 in
> 
>
> Hello everybody, sorry for my poor english.
> I want to use the FunFX + Watir to test the Flex WEB applications in
> Windows,
> and the browser is IE7. But when the flex_app object call some method, it
> will
> give some error info.
>
> My system info:
>
> WinXP SP3
> ruby 1.8.7
> watir 1.6.7
> funfx 0.2.2
>
> my test sample is :
>
> require 'rubygems'
> require 'test/unit'
> require 'funfx'
> require 'funfx/browser/watir'
>
> class AccordionTest < Test::Unit::TestCase
>
> @ie = Watir::IE.new()
>
> @ie.goto("http://funfx.rubyforge.org/Flex/FlexObjectTest/FlexObjectTest.html";)
> @flex = @ie.flex_app("FlexObjectTest","FlexObjectTest")
> puts @flex.methods
>
> tree = @flex.tree(:id=>'treeData').open(:item_renderer,"Container
> controls")
>
> end
>
> run with this watir.rb:
>
> output log:>ruby accordion_test.rb
>
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:25 
> :in
> `method_missing': unknown property or method `fireFunFXEvent'
> (WIN32OLERuntimeError)
> HRESULT error code:0x80020006
>   未知名称。
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:25 
> :in
> `fire_event'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:27: in
> `fire_event'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:55: in
> `flex_invoke'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:26: in
> `fire_event'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/elements.rb:10 
> 87:in
> `open'
> from accordion_test.rb:14
> to_yaml_style
> before_text
> horizontal_list
> labels
> set_container
> bar_chart
> ...
>
> i searched in the funfx group and found a method to change the watir.rb to
> test this, but
> it give the error info :
>
>  run with this watir.rb:
>
> >ruby accordion_test.rb
>
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:41 
> :in
> `method_missing': execScript (WIN32OLERuntimeError)
> OLE error code:80020101 in 
>   ��变虹�伴��璇� 80020101 ���瀵艰�存�ら」���浣娉�瀹� EURO?
> HRESULT error code:0x80020009
>   发生意外。
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:41 
> :in
> `exec_script'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:23 
> :in
> `fire_event'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:27: in
> `fire_event'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:55: in
> `flex_invoke'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:26: in
> `fire_event'
> from
> C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/elements.rb:10 
> 87:in
> `open'
> from accordion_test.rb:14
> typingspeed=
> to_yaml_style
> present?
> ..
>
> i checked the watir.rb file, and maybe this
>
> @ole_obj.ie.Document.parentWindow.execScript(js)
>
> execScript method not defined? someone can help me how to resolve this
> problem?
>
> 
> ZTE Information Security Notice: The information contained in this mail is 
> solely property of the sender's organization. This mail communication is 
> confidential. Recipients named above are obligated to maintain secrecy and 
> are not permitted to disclose the contents of this communication to others.
> This email and any files transmitted with it are confidential and intended 
> solely for the use of the individual or entity to whom they are addressed. If 
> you have received this email in error please notify the originator of the 
> message. Any views expressed in this message are those of the individual 
> sender.
> This message has been scanned for viruses and Spam by ZTE Anti-Spam system.
>
>  watir_bak.rb
> 1KViewDownload
>
>  watir.rb
> 3KViewDownload

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Help: File Size defining with Cucumber Watir.

2010-12-19 Thread Irfan Ahmed
Hi, Jarmo Pertman,
Thanks for your response. Actually there was a problem to find out a file
size for upload. Becuase, I need to know if the file size is more then
"something" then the system will display a message "xcvbnnm". Look at the
step generated by cucumber:
*Given /^I have selected a logo "([^"]*)" of size (\d+) MB$/ do |arg1, arg2|
*
*  browser.file_field(:name, "file").set(arg1)*
*end*
*
this step will be passed if size of image file arg2 is the size equal to
arg1.

the file there I set (**browser.file_field(:name, "file").set(arg1)) too
upload a picture, I need to write a code to show that the file has a size of
minimum requirement and so that I need to findout the size of that. So here
I need to know how know a size of a picture or any file which are taken to
upload.
*


On Sun, Dec 19, 2010 at 6:24 PM, Jarmo Pertman  wrote:

> I didn't understand what's the exact problem. Could you be more
> specific what you'd want to exactly do?
>
> Jarmo Pertman
> -
> IT does really matter - http://www.itreallymatters.net
>
>
> On Dec 19, 5:02 am, Irfan Ahmed  wrote:
> > Hi,
> > I am working for automation with Cucumber and watir in a software
> company.
> > I have a problem while working  windows component for uploading I need to
> do
> > the following:
> >
> > *Given /^I have selected a logo "([^"]*)" of size (\d+) MB$/ do |arg1,
> arg2|
> > *
> > *  browser.file_field(:name, "file").set(arg1)*
> > *end*
> > *
> > *
> > But, I am having problem to get to the file size to pass this test. I
> need
> > to compare the file size with the given size.
> >
> > Anybody, please help me as soon as possible.
> >
> > --
> > Thanks,
> > Irfan Ahmed Rizvi (Sagar)
> >
> > cell Numbers:
> > +880 1676  246  991
> > +880 1723  712  888
> >
> > Tasawr Interactive 
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>



-- 
Thanks,
Irfan Ahmed Rizvi (Sagar)

cell Numbers:
+880 1676  246  991
+880 1723  712  888

http://www.welltreat.us
http://restaurant.welltreat.us/
http://isp.welltreat.us/

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Help: File Size defining with Cucumber Watir.

2010-12-19 Thread Jarmo Pertman
I didn't understand what's the exact problem. Could you be more
specific what you'd want to exactly do?

Jarmo Pertman
-
IT does really matter - http://www.itreallymatters.net


On Dec 19, 5:02 am, Irfan Ahmed  wrote:
> Hi,
> I am working for automation with Cucumber and watir in a software company.
> I have a problem while working  windows component for uploading I need to do
> the following:
>
> *Given /^I have selected a logo "([^"]*)" of size (\d+) MB$/ do |arg1, arg2|
> *
> *  browser.file_field(:name, "file").set(arg1)*
> *end*
> *
> *
> But, I am having problem to get to the file size to pass this test. I need
> to compare the file size with the given size.
>
> Anybody, please help me as soon as possible.
>
> --
> Thanks,
> Irfan Ahmed Rizvi (Sagar)
>
> cell Numbers:
> +880 1676  246  991
> +880 1723  712  888
>
> Tasawr Interactive 

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: help-please: cucumber-watir tutorial

2010-12-14 Thread Irfan Ahmed
Hi everybody,
You people are too much helpful..I am really grateful to you. I wish one
day, some how, I can also help you...:)

On Tue, Dec 14, 2010 at 5:22 PM, Keith Hughes  wrote:

> Irfan,
>
> Have a look at these,
>
> http://khughes88.wordpress.com/tag/cucumber/
> http://khughes88.wordpress.com/tag/webdriver/
>
>
> rgds
> Keith
>
>
>
> On Tue, Dec 14, 2010 at 3:04 AM, Dave McNulla  wrote:
>
>> that's on my wish list. i'll probably buy it next.
>>
>> dave
>>
>>
>> On Dec 13, 10:39 am, Chuck van der Linden  wrote:
>> > http://www.pragprog.com/titles/achbd/the-rspec-book
>> >
>> > buy and read
>> >
>> > On Dec 12, 4:39 pm, Basim Baassiri  wrote:
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > Have you read any information herehttp://www.cuke4ninja.com/
>> >
>> > > On Sun, Dec 12, 2010 at 12:40 PM, Irfan Ahmed 
>> wrote:
>> > > > Hi,
>> > > > Anybody here who can provide some tutorial links/books on Cucumber-
>> > > > Watir-Wevdriver?
>> >
>> > > > I need this help very urgently. Please help me.
>> >
>> > > > --
>> > > > Before posting, please readhttp://watir.com/support. In short:
>> search
>> > > > before you ask, be nice.
>> >
>> > > > watir-general@googlegroups.com
>> > > >http://groups.google.com/group/watir-general
>> > > > watir-general+unsubscr...@googlegroups.com- Hide quoted text -
>> >
>> > > - Show quoted text -
>>
>> --
>> Before posting, please read http://watir.com/support. In short: search
>> before you ask, be nice.
>>
>> watir-general@googlegroups.com
>> http://groups.google.com/group/watir-general
>> watir-general+unsubscr...@googlegroups.com
>>
>
>  --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>



-- 
Thanks,
Irfan Ahmed Rizvi (Sagar)

cell Numbers:
+880 1676  246  991
+880 1723  712  888

http://www.welltreat.us
http://restaurant.welltreat.us/
http://isp.welltreat.us/

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: help-please: cucumber-watir tutorial

2010-12-14 Thread Keith Hughes
Irfan,

Have a look at these,

http://khughes88.wordpress.com/tag/cucumber/
http://khughes88.wordpress.com/tag/webdriver/


rgds
Keith


On Tue, Dec 14, 2010 at 3:04 AM, Dave McNulla  wrote:

> that's on my wish list. i'll probably buy it next.
>
> dave
>
>
> On Dec 13, 10:39 am, Chuck van der Linden  wrote:
> > http://www.pragprog.com/titles/achbd/the-rspec-book
> >
> > buy and read
> >
> > On Dec 12, 4:39 pm, Basim Baassiri  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Have you read any information herehttp://www.cuke4ninja.com/
> >
> > > On Sun, Dec 12, 2010 at 12:40 PM, Irfan Ahmed 
> wrote:
> > > > Hi,
> > > > Anybody here who can provide some tutorial links/books on Cucumber-
> > > > Watir-Wevdriver?
> >
> > > > I need this help very urgently. Please help me.
> >
> > > > --
> > > > Before posting, please readhttp://watir.com/support. In short:
> search
> > > > before you ask, be nice.
> >
> > > > watir-general@googlegroups.com
> > > >http://groups.google.com/group/watir-general
> > > > watir-general+unsubscr...@googlegroups.com- Hide quoted text -
> >
> > > - Show quoted text -
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: help-please: cucumber-watir tutorial

2010-12-13 Thread Dave McNulla
that's on my wish list. i'll probably buy it next.

dave


On Dec 13, 10:39 am, Chuck van der Linden  wrote:
> http://www.pragprog.com/titles/achbd/the-rspec-book
>
> buy and read
>
> On Dec 12, 4:39 pm, Basim Baassiri  wrote:
>
>
>
>
>
>
>
> > Have you read any information herehttp://www.cuke4ninja.com/
>
> > On Sun, Dec 12, 2010 at 12:40 PM, Irfan Ahmed  wrote:
> > > Hi,
> > > Anybody here who can provide some tutorial links/books on Cucumber-
> > > Watir-Wevdriver?
>
> > > I need this help very urgently. Please help me.
>
> > > --
> > > Before posting, please readhttp://watir.com/support. In short: search
> > > before you ask, be nice.
>
> > > watir-general@googlegroups.com
> > >http://groups.google.com/group/watir-general
> > > watir-general+unsubscr...@googlegroups.com- Hide quoted text -
>
> > - Show quoted text -

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: help-please: cucumber-watir tutorial

2010-12-13 Thread Chuck van der Linden
http://www.pragprog.com/titles/achbd/the-rspec-book

buy and read

On Dec 12, 4:39 pm, Basim Baassiri  wrote:
> Have you read any information herehttp://www.cuke4ninja.com/
>
>
>
> On Sun, Dec 12, 2010 at 12:40 PM, Irfan Ahmed  wrote:
> > Hi,
> > Anybody here who can provide some tutorial links/books on Cucumber-
> > Watir-Wevdriver?
>
> > I need this help very urgently. Please help me.
>
> > --
> > Before posting, please readhttp://watir.com/support. In short: search
> > before you ask, be nice.
>
> > watir-general@googlegroups.com
> >http://groups.google.com/group/watir-general
> > watir-general+unsubscr...@googlegroups.com- Hide quoted text -
>
> - Show quoted text -

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Help: cant get jSSH to work on windows 2003

2010-07-21 Thread Eddie
thanks, the problem was solved by using FF 3.5.10 (and xpi 3.5).
installing as admin did not help.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Help: cant get jSSH to work on windows 2003

2010-07-21 Thread Angrez Singh
Is the problem still there? Can you make sure you are installing JSSh using
administrator privileges?

- Angrez

On Wed, Jul 21, 2010 at 2:18 AM, Eddie  wrote:

> No, there was no firewall. server used only IPsec, and even with IPsec
> OFF, i still had the problem.
>
> I solved it by using FF 3.5.10 (and xpi 3.5). The problem that I had
> then was:
>
> 
> Win32::Registry::Error in ProcessController#index
>
> The system cannot find the file specified.
> RAILS_ROOT: V:/RoRapp
>
> Application Trace | Framework Trace | Full Trace
> C:/Ruby186/lib/ruby/1.8/win32/registry.rb:528:in `open'
> C:/Ruby186/lib/ruby/1.8/win32/registry.rb:608:in `open'
> C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
> firefox.rb:1025:in `path_from_registry'
> C:/Ruby186/lib/ruby/1.8/win32/registry.rb:532:in `open'
> C:/Ruby186/lib/ruby/1.8/win32/registry.rb:608:in `open'
> C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
> firefox.rb:1024:in `path_from_registry'
> C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
> firefox.rb:993:in `path_to_bin'
> C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
> firefox.rb:152:in `launch_browser'
> C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
> firefox.rb:128:in `initialize'
> V:/RoRapp/app/controllers/process_controller.rb:31:in `new'
> V:/RoRapp/app/controllers/process_controller.rb:31:in `run_process'
> V:/RoRapp/app/controllers/process_controller.rb:9:in `index'
> 
>
> which was solved by changing line 1025 of
> C:\Ruby186\lib\ruby\gems\1.8\gems\firewatir-1.6.5\lib\firewatir
> \firefox.rb
> to
>reg1 = lm.open("SOFTWARE\\Mozilla\\Mozilla Firefox\\Main")
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: watir-general@googlegroups.com
> To unsubscribe: 
> watir-general+unsubscr...@googlegroups.com
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Help: cant get jSSH to work on windows 2003

2010-07-20 Thread Eddie
No, there was no firewall. server used only IPsec, and even with IPsec
OFF, i still had the problem.

I solved it by using FF 3.5.10 (and xpi 3.5). The problem that I had
then was:


Win32::Registry::Error in ProcessController#index

The system cannot find the file specified.
RAILS_ROOT: V:/RoRapp

Application Trace | Framework Trace | Full Trace
C:/Ruby186/lib/ruby/1.8/win32/registry.rb:528:in `open'
C:/Ruby186/lib/ruby/1.8/win32/registry.rb:608:in `open'
C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
firefox.rb:1025:in `path_from_registry'
C:/Ruby186/lib/ruby/1.8/win32/registry.rb:532:in `open'
C:/Ruby186/lib/ruby/1.8/win32/registry.rb:608:in `open'
C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
firefox.rb:1024:in `path_from_registry'
C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
firefox.rb:993:in `path_to_bin'
C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
firefox.rb:152:in `launch_browser'
C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
firefox.rb:128:in `initialize'
V:/RoRapp/app/controllers/process_controller.rb:31:in `new'
V:/RoRapp/app/controllers/process_controller.rb:31:in `run_process'
V:/RoRapp/app/controllers/process_controller.rb:9:in `index'


which was solved by changing line 1025 of
C:\Ruby186\lib\ruby\gems\1.8\gems\firewatir-1.6.5\lib\firewatir
\firefox.rb
to
reg1 = lm.open("SOFTWARE\\Mozilla\\Mozilla Firefox\\Main")

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Help with Watir Page Checkers

2010-03-03 Thread marekj
Are you using IE8 ? or IE 7?

When using IE 8 the IE#check_for_http_error doesn't raise an error as
expected and always returns false.
in IE7 it works.
The implementation checks for IE 7 condition or assumes it's IE6 (yes,
code was written before IE8 here)
this line
 if m and m[1] =='7.0'
could be patched as:
if ['7.0', '8.0'].member?(m[1])

this would account for both IE7 and IE8 browsers.
it's a bit late for me and I am too lazy to check further.
but I think this is the reason the error is not raise when using checkers.
Also please check the blog post I did a while back on checkers if you
fancy that stuff.
http://rubytester.com/blog/2009/07/27/watir-run-error-checks-callback-in-wait-method.html

hth

marekj

Watirloo: Semantic Page Objects in UseCases
http://github.com/marekj/watirloo/
Support Watir Project http://pledgie.com/campaigns/2982



On Wed, Mar 3, 2010 at 10:01 AM, yoggy  wrote:
> Just an update to my previous post. Because the website am testing
> requires some form of LDAP authentication, the RESPONSE_CODE_CHECKER
> code checker i have written fails with a 401 everytime, any ideas as
> to how to fix this???
>
> On Mar 3, 10:45 am, yoggy  wrote:
>> Hi Marek,
>>
>> I did what you told me to do and it justs prints a space and nothing
>> else. I am not sure the checker which ships with Watir is robust
>> enough to check the page response. I think it doesnt raise any
>> exception for page which i am testing. The watir page checker code is
>> below:
>>
>>  def check_for_http_error
>>       # check for IE7
>>       n = self.document.invoke('parentWindow').navigator.appVersion
>>       m=/MSIE\s(.*?);/.match( n )
>>       if m and m[1] =='7.0'
>>         if m = /HTTP (\d\d\d.*)/.match( self.title )
>>           raise NavigationException, m[1]
>>         end
>>       else
>>         # assume its IE6
>>         url = self.document.location.href
>>         if /shdoclc.dll/.match(url)
>>           m = /id=IEText.*?>(.*?)>           raise NavigationException, m[1] if m
>>         end
>>       end
>>       false
>>
>> I dont know ruby too well but it seems to be doing some checks on url
>> and body text of page displayed which i dont think would work
>> extremely well for all web apps
>>
>> The error on page looks like:
>>
>> Server Error in '/' Application.
>> Access is denied.
>> Description: An error occurred while accessing the resources required
>> to serve this request. The server may not be configured for access to
>> the requested URL.
>>
>> Error message 401.2.: Unauthorized: Logon failed due to server
>> configuration.  Verify that you have permission to view this directory
>> or page based on the credentials you supplied and the authentication
>> methods enabled on the Web server.  Contact the Web server's
>> administrator for additional assistance.
>>
>> so i wrote a custom error checker which uses the
>> Net::Http.get_response for ruby and that seems to work okay. The code
>> looks like that.
>>
>> RESPONSE_CODE_CHECKER = lambda do |browser|
>>   response = Net::HTTP.get_response(URI.parse(browser.url.to_s))
>>   raise Watir::Exception::NavigationException unless(response.code =~ /
>> 2|3\d{2}/ )
>> end
>>
>> I would appreciate some comments or feeback on this as i am not a ruby
>> guru ..
>>
>> On Mar 3, 2:39 am, marekj  wrote:
>>
>> > When you run those lines what happens?
>>
>> > begin
>> >   browser.add_checker PageCheckers::NAVIGATION_CHECKER
>> >   
>> > browser.goto("http://www.somecrazynonexistantthing.com/reallynonexistant";)
>> > resuce=> e
>> >   put e
>> > end
>>
>> > what is the value of e?
>>
>> > marekj
>>
>> > Watirloo: Semantic Page Objects in 
>> > UseCaseshttp://github.com/marekj/watirloo/
>> > Support Watir Projecthttp://pledgie.com/campaigns/2982
>>
>> > On Tue, Mar 2, 2010 at 10:16 AM, yoggy  
>> > wrote:
>> > > I have included the raise and it doesnt work still.
>>
>> > > I also removed the rescue and puts line
>>
>> > > still this doesnt work,
>>
>> > > My test stak is using Cucumber + Watir, could this be a reason ...
>> > > Confused :(
>>
>> > > --
>> > > 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 
>> > > athttp://groups.google.com/group/watir-general
>>
>>
>
> --
> 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://gr

Re: [wtr-general] Re: Help with Watir Page Checkers

2010-03-03 Thread Paul Rogers
the error checkers use the standard IE error page. Your app or web server
can override these to display a different page to the user. Youd have to
write your own checker for that.

Paul

On Wed, Mar 3, 2010 at 3:45 AM, yoggy  wrote:

> Hi Marek,
>
> I did what you told me to do and it justs prints a space and nothing
> else. I am not sure the checker which ships with Watir is robust
> enough to check the page response. I think it doesnt raise any
> exception for page which i am testing. The watir page checker code is
> below:
>
>  def check_for_http_error
>  # check for IE7
>  n = self.document.invoke('parentWindow').navigator.appVersion
>  m=/MSIE\s(.*?);/.match( n )
>  if m and m[1] =='7.0'
>if m = /HTTP (\d\d\d.*)/.match( self.title )
>  raise NavigationException, m[1]
>end
>  else
># assume its IE6
>url = self.document.location.href
>if /shdoclc.dll/.match(url)
>  m = /id=IEText.*?>(.*?)  raise NavigationException, m[1] if m
>end
>  end
>  false
>
> I dont know ruby too well but it seems to be doing some checks on url
> and body text of page displayed which i dont think would work
> extremely well for all web apps
>
> The error on page looks like:
>
> Server Error in '/' Application.
> Access is denied.
> Description: An error occurred while accessing the resources required
> to serve this request. The server may not be configured for access to
> the requested URL.
>
> Error message 401.2.: Unauthorized: Logon failed due to server
> configuration.  Verify that you have permission to view this directory
> or page based on the credentials you supplied and the authentication
> methods enabled on the Web server.  Contact the Web server's
> administrator for additional assistance.
>
> so i wrote a custom error checker which uses the
> Net::Http.get_response for ruby and that seems to work okay. The code
> looks like that.
>
> RESPONSE_CODE_CHECKER = lambda do |browser|
>  response = Net::HTTP.get_response(URI.parse(browser.url.to_s))
>  raise Watir::Exception::NavigationException unless(response.code =~ /
> 2|3\d{2}/ )
> end
>
> I would appreciate some comments or feeback on this as i am not a ruby
> guru ..
>
> On Mar 3, 2:39 am, marekj  wrote:
> > When you run those lines what happens?
> >
> > begin
> >   browser.add_checker PageCheckers::NAVIGATION_CHECKER
> >   browser.goto("
> http://www.somecrazynonexistantthing.com/reallynonexistant";)
> > resuce=> e
> >   put e
> > end
> >
> > what is the value of e?
> >
> > marekj
> >
> > Watirloo: Semantic Page Objects in UseCaseshttp://
> github.com/marekj/watirloo/
> > Support Watir Projecthttp://pledgie.com/campaigns/2982
> >
> > On Tue, Mar 2, 2010 at 10:16 AM, yoggy 
> wrote:
> > > I have included the raise and it doesnt work still.
> >
> > > I also removed the rescue and puts line
> >
> > > still this doesnt work,
> >
> > > My test stak is using Cucumber + Watir, could this be a reason ...
> > > Confused :(
> >
> > > --
> > > 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 athttp://
> groups.google.com/group/watir-general
> >
> >
>
> --
> 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
>

-- 
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: Help with Watir Page Checkers

2010-03-03 Thread yoggy
Just an update to my previous post. Because the website am testing
requires some form of LDAP authentication, the RESPONSE_CODE_CHECKER
code checker i have written fails with a 401 everytime, any ideas as
to how to fix this???

On Mar 3, 10:45 am, yoggy  wrote:
> Hi Marek,
>
> I did what you told me to do and it justs prints a space and nothing
> else. I am not sure the checker which ships with Watir is robust
> enough to check the page response. I think it doesnt raise any
> exception for page which i am testing. The watir page checker code is
> below:
>
>  def check_for_http_error
>       # check for IE7
>       n = self.document.invoke('parentWindow').navigator.appVersion
>       m=/MSIE\s(.*?);/.match( n )
>       if m and m[1] =='7.0'
>         if m = /HTTP (\d\d\d.*)/.match( self.title )
>           raise NavigationException, m[1]
>         end
>       else
>         # assume its IE6
>         url = self.document.location.href
>         if /shdoclc.dll/.match(url)
>           m = /id=IEText.*?>(.*?)           raise NavigationException, m[1] if m
>         end
>       end
>       false
>
> I dont know ruby too well but it seems to be doing some checks on url
> and body text of page displayed which i dont think would work
> extremely well for all web apps
>
> The error on page looks like:
>
> Server Error in '/' Application.
> Access is denied.
> Description: An error occurred while accessing the resources required
> to serve this request. The server may not be configured for access to
> the requested URL.
>
> Error message 401.2.: Unauthorized: Logon failed due to server
> configuration.  Verify that you have permission to view this directory
> or page based on the credentials you supplied and the authentication
> methods enabled on the Web server.  Contact the Web server's
> administrator for additional assistance.
>
> so i wrote a custom error checker which uses the
> Net::Http.get_response for ruby and that seems to work okay. The code
> looks like that.
>
> RESPONSE_CODE_CHECKER = lambda do |browser|
>   response = Net::HTTP.get_response(URI.parse(browser.url.to_s))
>   raise Watir::Exception::NavigationException unless(response.code =~ /
> 2|3\d{2}/ )
> end
>
> I would appreciate some comments or feeback on this as i am not a ruby
> guru ..
>
> On Mar 3, 2:39 am, marekj  wrote:
>
> > When you run those lines what happens?
>
> > begin
> >   browser.add_checker PageCheckers::NAVIGATION_CHECKER
> >   browser.goto("http://www.somecrazynonexistantthing.com/reallynonexistant";)
> > resuce=> e
> >   put e
> > end
>
> > what is the value of e?
>
> > marekj
>
> > Watirloo: Semantic Page Objects in 
> > UseCaseshttp://github.com/marekj/watirloo/
> > Support Watir Projecthttp://pledgie.com/campaigns/2982
>
> > On Tue, Mar 2, 2010 at 10:16 AM, yoggy  wrote:
> > > I have included the raise and it doesnt work still.
>
> > > I also removed the rescue and puts line
>
> > > still this doesnt work,
>
> > > My test stak is using Cucumber + Watir, could this be a reason ...
> > > Confused :(
>
> > > --
> > > 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 
> > > athttp://groups.google.com/group/watir-general
>
>

-- 
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: Help with Watir Page Checkers

2010-03-03 Thread yoggy
Hi Marek,

I did what you told me to do and it justs prints a space and nothing
else. I am not sure the checker which ships with Watir is robust
enough to check the page response. I think it doesnt raise any
exception for page which i am testing. The watir page checker code is
below:

 def check_for_http_error
  # check for IE7
  n = self.document.invoke('parentWindow').navigator.appVersion
  m=/MSIE\s(.*?);/.match( n )
  if m and m[1] =='7.0'
if m = /HTTP (\d\d\d.*)/.match( self.title )
  raise NavigationException, m[1]
end
  else
# assume its IE6
url = self.document.location.href
if /shdoclc.dll/.match(url)
  m = /id=IEText.*?>(.*?) wrote:
> When you run those lines what happens?
>
> begin
>   browser.add_checker PageCheckers::NAVIGATION_CHECKER
>   browser.goto("http://www.somecrazynonexistantthing.com/reallynonexistant";)
> resuce=> e
>   put e
> end
>
> what is the value of e?
>
> marekj
>
> Watirloo: Semantic Page Objects in UseCaseshttp://github.com/marekj/watirloo/
> Support Watir Projecthttp://pledgie.com/campaigns/2982
>
> On Tue, Mar 2, 2010 at 10:16 AM, yoggy  wrote:
> > I have included the raise and it doesnt work still.
>
> > I also removed the rescue and puts line
>
> > still this doesnt work,
>
> > My test stak is using Cucumber + Watir, could this be a reason ...
> > Confused :(
>
> > --
> > 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 
> > athttp://groups.google.com/group/watir-general
>
>

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


Re: [wtr-general] Re: Help with Watir Page Checkers

2010-03-02 Thread marekj
When you run those lines what happens?

begin
  browser.add_checker PageCheckers::NAVIGATION_CHECKER
  browser.goto("http://www.somecrazynonexistantthing.com/reallynonexistant";)
resuce=> e
  put e
end

what is the value of e?


marekj

Watirloo: Semantic Page Objects in UseCases
http://github.com/marekj/watirloo/
Support Watir Project http://pledgie.com/campaigns/2982



On Tue, Mar 2, 2010 at 10:16 AM, yoggy  wrote:
> I have included the raise and it doesnt work still.
>
> I also removed the rescue and puts line
>
> still this doesnt work,
>
> My test stak is using Cucumber + Watir, could this be a reason ...
> Confused :(
>
>
> --
> 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
>

-- 
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: Help with Watir Page Checkers

2010-03-02 Thread yoggy
I have included the raise and it doesnt work still.

I also removed the rescue and puts line

still this doesnt work,

My test stak is using Cucumber + Watir, could this be a reason ...
Confused :(


-- 
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: Help with Modal Dialog boxes !!!!

2010-02-12 Thread GJHmf
@ Rohan

I had cause to revisit this issue after this afternoon suddently
having a similar modal window problem, and realise now what you were
on about and me telling you irrelevant info.  My solution was
naturally for attaching to browser windows spawned from a modal,
whereas your issue is for attaching to modals themselves.

I spotted this via the WATiR tutorial pages, and solved my modal
attachment woes (http://jira.openqa.org/browse/WTR-414).  It says its
an IE8 problem, but I experienced it on IE7.  I edited the
modal_dialog.rb file in my gems from 'Web Page Dialog' to 'Webpage
Dialog' and I could then interrogate the modal using the title.

I hope this helps you some more.


GJHmf

-- 
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: Help required to access src element in the following code.

2010-02-10 Thread Super Kevy
A: It is not an image its a flash object.
B: This description (below) doesnt match your original code snippet
which shows both items always visible.  The orginal code contained a
lot of text but not a lot of information about what are you trying to
do and what object your trying to verify.
C: The following answers your question below

if ie.html.include?('src=/bf/Charts/Pie2D.swf') then puts 'FOUND
PIE2D' end

ie.html.include?('src="/bf/Charts/Pie3D.swf') then puts 'FOUND PIE3D'
end




On Feb 9, 6:11 am, ashwin mahesh  wrote:
> There is a chart which shows data in four formats namely 2D pie chart,
> 3D pie chart, bar chart and tabular table. So to change from one type
> of format to another I need to click on a image. I want to verify
> whether the chart shown is according to the image on which I clicked.
> When I click on image the SRC attribute changes from src="/bf/Charts/
> Pie2D.swf to src="/bf/Charts/Pie3D.swf.( when I click on image for 3D
> pie chart ).  I need to verify this change in the SRC attribute.
>   But src is the attribute for "embed" element. So can you tell me how
> to use this src for verification.
>
> On Feb 9, 4:44 pm, Željko Filipin 
> wrote:
>
>
>
> > On Tue, Feb 9, 2010 at 6:23 AM, ashwin mahesh  wrote:
> > > Any idea how to overcome this problem.
>
> > No, because you did not provide answers to my questions.
>
> > Željko
> > --
> > watir.com - community manager
> > pledgie.com/campaigns/2982 - donate to Watir
> > watirpodcast.com - host
> > testingpodcast.com - podcasts on software testing. all of them- Hide quoted 
> > text -
>
> - Show quoted text -

-- 
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: Help with Modal Dialog boxes !!!!

2010-02-10 Thread chandu.tennety
I noticed that your Watir version is 1.5.2. I'm not sure how well
modal dialogs were supported in that version. I would upgrade and try
some of Charley's solutions.

Chandu

On Feb 10, 12:40 am, Rohan Premvallabh Ojha 
wrote:
> HI Charley,
>
> I had tried the method that you have specified and re-tried it after your 
> post again.
>
> This is the message that comes up when I try to use it :
>
> >ruby nn.rb
>
> c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.2/./watir.rb:2775:in `initialize': 
> IE#modal_dialog not supported with the current version of Ruby (1.8.6). 
> (NoMethodError)
> Seehttp://jira.openqa.org/browse/WTR-2for details.
> undefined method `connect_unknown' for WIN32OLE:Class        from 
> c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.2/./watir.rb:335:in `new'
>           from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.2/./watir.rb:335:in 
> `modal_dialog'
>           from nn.rb:12
>
> >Exit code: 1
>
> So if you have this the connect_unknown' method for your Win32Ole ,can you 
> please share it with us as well.. I know there's a little bit of tweak 
> required with the connect method but still if you can share it would be 
> brilliant.
>
> Thanks
> Rohan Ojha
>
> 
> From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] 
> On Behalf Of Charley Baker
> Sent: Tuesday, February 09, 2010 9:22 PM
> To: watir-general@googlegroups.com
> Subject: Re: [wtr-general] Help with Modal Dialog boxes 
>
> It's a modal dialog alright.
>
> puts ie.modal_dialog.html
> puts ie.modal_dialog.title
>
> etc etc
>
> Works fine for us with latest Watir and Ruby 186. I've made sure that it does 
> work for each revision of Watir, including recompiling our custom win32ole.so 
> since we have apps that use it fairly extensively - up to 8 modals deep at 
> times. :\
>
> -Charley
> Lead Developer, Watir
>
> On Tue, Feb 9, 2010 at 5:49 AM, Željko Filipin 
> mailto:zeljko.fili...@wa-research.ch>> wrote:
> On Tue, Feb 9, 2010 at 1:46 PM, Rohan Premvallabh Ojha 
> mailto:rohan.o...@bsil.com>> wrote:> Also the title of 
> the window just gives it awaydoesn't it ?
>
> Pop ups are black magic for me. I have been lucky so far and never had to 
> deal with them, except for file uploads which work just fine.
>
> Ž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 
> athttp://groups.google.com/group/watir-general
>
> --
> 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 
> athttp://groups.google.com/group/watir-general

-- 
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: Help with Modal Dialog boxes !!!!

2010-02-09 Thread jw
By "having the access right" do you mean access as in "permissions" or
just you're not accessing it correctly?

I have been using enabled_popup and WinClicker to interact with
javascript modal dialogs with decent success.
The button I had to click was labelled "Open" but the button name I
had to pass to WinClicker was "&Open"

I don't know if this is a convention or if it's just in my app.  I
found this out by

ie = attach (...)
# manually click the button to create the modal
hwnd = ie.enabled_popup(3)
w = WinClicker.new
w.get_static_text_hwnd(hwnd)
=> ["Look &in:", "", "File &name:", "Files of &type:"]
w.clickWindowsButton_hwnd(hwnd, 'Open')
=> false
w.clickWindowsButton_hwnd(hwnd, '&Open')
=> true


if you do a
puts w.methods
you'll see the methods like
get_static_text_hwnd
get_win_title
getStaticText
getStaticText_hWnd
get_static_text_hwnd
that you can try using to figure out what the button is actually
called.

hopefully i'm not just telling you stuff you already know/have
tried...



On Feb 9, 6:25 am, Rohan Premvallabh Ojha  wrote:
> Hi,
>
> Thanks for the information/URL but I am still unable to move ahead with the 
> modal dialogs.
>
> What I have tried so far is:
>
> Method I:
>
> Used all the methods in the watir.rb file for Class ModalDialog but they 
> don't seem to work with Ruby ver 1.8.6 or 1.8.5 for that matter.
> So I had Ruby 1.8.2 installed in another machine but that doesn't seem to 
> support "click_no_wait".
>
> mod= ModalDialog.new
> mod.find_modal_from_window
>
> Method II :
>
> Tried using the modal dialog example from the Wiki page
>
>  modal = ie.modal_dialog(:title,'Modal Dialog - Webpage Dialog')
>  puts modal.title()
>  modal.wait
>  puts modal.button(:index,1)
>
> Method III :
>
> Tried finding the connect_unknown method in Win32Ole.
>
> We encounter NoMethodError for connect_unknown in the locate method for the 
> class ModalDialog. However win32ole doesn't have any method by such name.The 
> method present is connect which takes argument as either OLE program id or 
> class id or moniker.
>
> Method IV :
>
> Winclicker
>
> Tried using the winclicker class of watir to handle the modal dialog.
>
> w=WinClicker.new
> q1=w.getWindowHandle(/Webpage Dialog/)
> puts q1                                               (This returns to me the 
> hwnD for the modal dialog box)
> puts w.getWindowTitle(q1)                      (This returns to me the title 
> of the modal dialog window)
>
> However if we try to use :
> w.clickWindowsButton_hwnd(q1,'Run')                 (Run is the caption of 
> the button that I need to click)
>
> The system returns me FALSE so even though we have control of the modal 
> dialog we still don't have the access right to the window.
>
> Also it seems to me that as we have moved ahead with newer versions of Ruby 
> and Watir we seemed to have gone backwards with respect to pop-ups (modal or 
> non-modal)
>
> So can you guys please look into it so that we can get going with not just  
> this but with other such problems in Watir
>
> 
> From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] 
> On Behalf Of Željko Filipin
> Sent: Monday, February 08, 2010 6:07 PM
> To: watir-general@googlegroups.com
> Subject: Re: [wtr-general] Help with Modal Dialog boxes 
>
> On Mon, Feb 8, 2010 at 7:03 AM, Rohan Ojha 
> mailto:rohan.o...@bsil.com>> wrote:
> > Has anybody come across some method with which we can work on a modal 
> > dialog window.
>
> Thanks for the screen shot, it always helps.
>
> Did you read this?
>
> http://wiki.openqa.org/display/WTR/Pop+Upshttp://wiki.openqa.org/display/WTR/Modal+Dialogshttp://wiki.openqa.org/display/WTR/New+Browser+Windows
>
> Ž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 
> athttp://groups.google.com/group/watir-general

-- 
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: Help required to access src element in the following code.

2010-02-09 Thread jw
ok i get it.  it's an embed element as opposed to a button or link,
etc.
if you have an IE object you can use the "html" method to get the html
text.  not great but might do the trick

On Feb 9, 6:11 am, ashwin mahesh  wrote:
> There is a chart which shows data in four formats namely 2D pie chart,
> 3D pie chart, bar chart and tabular table. So to change from one type
> of format to another I need to click on a image. I want to verify
> whether the chart shown is according to the image on which I clicked.
> When I click on image the SRC attribute changes from src="/bf/Charts/
> Pie2D.swf to src="/bf/Charts/Pie3D.swf.( when I click on image for 3D
> pie chart ).  I need to verify this change in the SRC attribute.
>   But src is the attribute for "embed" element. So can you tell me how
> to use this src for verification.
>
> On Feb 9, 4:44 pm, Željko Filipin 
> wrote:
>
> > On Tue, Feb 9, 2010 at 6:23 AM, ashwin mahesh  wrote:
> > > Any idea how to overcome this problem.
>
> > No, because you did not provide answers to my questions.
>
> > Željko
> > --
> > watir.com - community manager
> > pledgie.com/campaigns/2982 - donate to Watir
> > watirpodcast.com - host
> > testingpodcast.com - podcasts on software testing. all of them

-- 
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: Help required to access src element in the following code.

2010-02-09 Thread ashwin mahesh
There is a chart which shows data in four formats namely 2D pie chart,
3D pie chart, bar chart and tabular table. So to change from one type
of format to another I need to click on a image. I want to verify
whether the chart shown is according to the image on which I clicked.
When I click on image the SRC attribute changes from src="/bf/Charts/
Pie2D.swf to src="/bf/Charts/Pie3D.swf.( when I click on image for 3D
pie chart ).  I need to verify this change in the SRC attribute.
  But src is the attribute for "embed" element. So can you tell me how
to use this src for verification.


On Feb 9, 4:44 pm, Željko Filipin 
wrote:
> On Tue, Feb 9, 2010 at 6:23 AM, ashwin mahesh  wrote:
> > Any idea how to overcome this problem.
>
> No, because you did not provide answers to my questions.
>
> Željko
> --
> watir.com - community manager
> pledgie.com/campaigns/2982 - donate to Watir
> watirpodcast.com - host
> testingpodcast.com - podcasts on software testing. all of them

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


Re: [wtr-general] Re: Help required to access src element in the following code.

2010-02-09 Thread Željko Filipin
On Tue, Feb 9, 2010 at 6:23 AM, ashwin mahesh  wrote:
> Any idea how to overcome this problem.

No, because you did not provide answers to my questions.

Željko
--
watir.com - community manager
pledgie.com/campaigns/2982 - donate to Watir
watirpodcast.com - host
testingpodcast.com - podcasts on software testing. all of them

-- 
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: Help required to access src element in the following code.

2010-02-08 Thread ashwin mahesh
Any idea how to overcome this problem.

Thanks,
Ashwin.

On Feb 6, 2:56 pm, ashwin mahesh  wrote:
> When I click on a button, src="/bf/Charts/Pie2D.swf" will change to
> src="/bf/Charts/Pie3D.swf". So to verify this change I need to access
> the the element whose attribute is src="/bf/Charts/Pie2D.swf". But
> from the above HTML code I am not able to identify the element.
>
> Thanks,
> Ashwin
> On Feb 5, 3:32 pm, Željko Filipin 
> wrote:
>
> > On Fri, Feb 5, 2010 at 10:47 AM, ashwin mahesh  wrote:
> > > I need to access the src="/bf/Charts/
> > > Pie2D.swf" present in the last line of the following HTML code, for
> > > verification.
>
> > What do you mean by "access"? Do you need to click it, play flash file, just
> > check if it is in the source code...? What have you tried? What is the
> > problem?
>
> > Željko
> > --
> > watir.com - community manager
> > watirpodcast.com - host

-- 
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: Help with Modal Dialog boxes !!!!

2010-02-08 Thread GJHmf
Hi,

I had this issue, and was partially what got me to migrate to Watir
from Selenium.  Assuming yours is the same setup as mine, I merely
attached to the open window like any other browser window using the
title.

e.g:  browser = Watir::IE.attach(:title, "Google")

I could then access any elements as normal as I would in the main
browser.

-- 
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: Help required to access src element in the following code.

2010-02-06 Thread ashwin mahesh
When I click on a button, src="/bf/Charts/Pie2D.swf" will change to
src="/bf/Charts/Pie3D.swf". So to verify this change I need to access
the the element whose attribute is src="/bf/Charts/Pie2D.swf". But
from the above HTML code I am not able to identify the element.

Thanks,
Ashwin
On Feb 5, 3:32 pm, Željko Filipin 
wrote:
> On Fri, Feb 5, 2010 at 10:47 AM, ashwin mahesh  wrote:
> > I need to access the src="/bf/Charts/
> > Pie2D.swf" present in the last line of the following HTML code, for
> > verification.
>
> What do you mean by "access"? Do you need to click it, play flash file, just
> check if it is in the source code...? What have you tried? What is the
> problem?
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host

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


Re: [wtr-general] Re: help me in using Excel DataDrivenTestHarnessExample

2009-12-09 Thread venkat
thanks very much, i will try with your solution.

On Wed, Dec 9, 2009 at 12:31 PM, venkat  wrote:

> Hi Tiffany,
> thanks and no confusion, we are on the same page.
>
>
> $addNotification = xlFile.getRowRecords("A1:E6", "Sheet4")
>
> $addNotification.each do |notification|
>  if notification['Priority'] == 'Urgent'
>$ie.select_list( :name , "tusers").select(record["Select_Users"]) # here
> it gets only 1row but i want it to get all rows, can you please provide me
> the syntax.
>$ie.button(:name,"select").click
>
> thanks
>
> On Wed, Dec 9, 2009 at 9:54 AM, Tiffany Fodor  wrote:
>
>> Hi Venky,
>>
>> The formatting on your example data was lost, so it's hard to see
>> exactly what you mean.  It seems you're trying to gather the data
>> conditionally based on the priority.  I'd suggest grabbing all the
>> data - make your range A1:E6 - and then deal with the data in your
>> code.  The headings in row 1 will be the hash keys you use to get at
>> the data in each cell of the subsequent rows.
>>
>> $addNotification = xlFile.getRowRecords("A1:E6", "Sheet4")
>>
>> $addNotification.each do |notification|
>>  if notification['Priority'] == 'Urgent'
>>#do whatever you need to with 'Urgent' priority users
>>  elsif notification['Priority'] == 'High'
>>#do whatever you need to with 'High' priority users
>>  else
>>#do whatever you need to with other users
>> end
>>
>> Hope this helps!
>>
>> -Tiffany
>>
>>
>> On Dec 8, 6:39 am, venkat  wrote:
>> >  Can any one please help me out in getting the multi row data from a
>> column
>> > using watir xls interface class.
>> >
>> > I have taken the DataDrivenTestHarnessExample as my source from Watir
>> > OpenQA.
>> >
>> > I have added test data into a sheet "Sheet4"
>> > Sheet4 has columns with data as follows.
>> >
>> > AB   C
>> > D  E
>> > Type   Priority  Select_Users
>> > Remove_Users  Yes
>> >  Information High  User1
>> > User1 No
>> >  Medium
>> > User2  User2
>> >   Low  User3
>> > User4
>> > User5
>> >
>> > I have to select the
>> >Type as "INFORMATIONAL"
>> > If Priority as Urgent then Select_Users =
>> all
>> > (6rows)
>> >else Priority is other than 'urgent then only
>> 2
>> > records from column Select_Users .
>> >
>> > I am using the following syntax to get a row of record.
>> > $addNotification = xlFile.getRowRecords("A2:E6", "Sheet4")
>> > but apart from getting the row, i need to get all records from the
>> column
>> > 'Select_Users'.
>> >
>> > Thanking you very much in adavance.
>> >
>> > Venky
>>
>> --
>> 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
>
>
>

-- 
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: help me in using Excel DataDrivenTestHarnessExample

2009-12-09 Thread Tiffany Fodor
Venky,

All of the rows are contained in your variable $addNotification and in
the solution below, you're iterating through each with the
$addNotification.each do |notification|

If you're trying to select all the values in a select_list, you can
use the select_list.options or select_list.getAllContents method to
get the contents of the select_list and then use the
select_list.select method to set the ones you want (or all of them).
If you need to compare the values in the select_list to the values in
$addNotification first, you can do that using Ruby hash and array
methods.

Hope this helps!

-Tiffany

On Dec 9, 12:01 am, venkat  wrote:
> Hi Tiffany,
> thanks and no confusion, we are on the same page.
>
> $addNotification = xlFile.getRowRecords("A1:E6", "Sheet4")
>
> $addNotification.each do |notification|
>  if notification['Priority'] == 'Urgent'
>    $ie.select_list( :name , "tusers").select(record["Select_Users"]) # here
> it gets only 1row but i want it to get all rows, can you please provide me
> the syntax.
>    $ie.button(:name,"select").click
>
> thanks
>
> On Wed, Dec 9, 2009 at 9:54 AM, Tiffany Fodor  wrote:
> > Hi Venky,
>
> > The formatting on your example data was lost, so it's hard to see
> > exactly what you mean.  It seems you're trying to gather the data
> > conditionally based on the priority.  I'd suggest grabbing all the
> > data - make your range A1:E6 - and then deal with the data in your
> > code.  The headings in row 1 will be the hash keys you use to get at
> > the data in each cell of the subsequent rows.
>
> > $addNotification = xlFile.getRowRecords("A1:E6", "Sheet4")
>
> > $addNotification.each do |notification|
> >  if notification['Priority'] == 'Urgent'
> >    #do whatever you need to with 'Urgent' priority users
> >  elsif notification['Priority'] == 'High'
> >    #do whatever you need to with 'High' priority users
> >  else
> >    #do whatever you need to with other users
> > end
>
> > Hope this helps!
>
> > -Tiffany
>
> > On Dec 8, 6:39 am, venkat  wrote:
> > >  Can any one please help me out in getting the multi row data from a
> > column
> > > using watir xls interface class.
>
> > > I have taken the DataDrivenTestHarnessExample as my source from Watir
> > > OpenQA.
>
> > > I have added test data into a sheet "Sheet4"
> > > Sheet4 has columns with data as follows.
>
> > > A                        B                       C
> > > D                              E
> > > Type                   Priority              Select_Users
> > > Remove_Users      Yes
> > >  Information         High                  User1
> > > User1                     No
> > >                              Medium
> > > User2                  User2
> > >                               Low                  User3
> > >                                                         User4
> > >                                                         User5
>
> > > I have to select the
> > >                                Type as "INFORMATIONAL"
> > >                             If Priority as Urgent then Select_Users = all
> > > (6rows)
> > >                            else Priority is other than 'urgent then only
> > 2
> > > records from column Select_Users .
>
> > > I am using the following syntax to get a row of record.
> > > $addNotification = xlFile.getRowRecords("A2:E6", "Sheet4")
> > > but apart from getting the row, i need to get all records from the column
> > > 'Select_Users'.
>
> > > Thanking you very much in adavance.
>
> > > Venky
>
> > --
> > 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

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


Re: [wtr-general] Re: help me in using Excel DataDrivenTestHarnessExample

2009-12-08 Thread venkat
Hi Tiffany,
thanks and no confusion, we are on the same page.

$addNotification = xlFile.getRowRecords("A1:E6", "Sheet4")

$addNotification.each do |notification|
 if notification['Priority'] == 'Urgent'
   $ie.select_list( :name , "tusers").select(record["Select_Users"]) # here
it gets only 1row but i want it to get all rows, can you please provide me
the syntax.
   $ie.button(:name,"select").click

thanks

On Wed, Dec 9, 2009 at 9:54 AM, Tiffany Fodor  wrote:

> Hi Venky,
>
> The formatting on your example data was lost, so it's hard to see
> exactly what you mean.  It seems you're trying to gather the data
> conditionally based on the priority.  I'd suggest grabbing all the
> data - make your range A1:E6 - and then deal with the data in your
> code.  The headings in row 1 will be the hash keys you use to get at
> the data in each cell of the subsequent rows.
>
> $addNotification = xlFile.getRowRecords("A1:E6", "Sheet4")
>
> $addNotification.each do |notification|
>  if notification['Priority'] == 'Urgent'
>#do whatever you need to with 'Urgent' priority users
>  elsif notification['Priority'] == 'High'
>#do whatever you need to with 'High' priority users
>  else
>#do whatever you need to with other users
> end
>
> Hope this helps!
>
> -Tiffany
>
>
> On Dec 8, 6:39 am, venkat  wrote:
> >  Can any one please help me out in getting the multi row data from a
> column
> > using watir xls interface class.
> >
> > I have taken the DataDrivenTestHarnessExample as my source from Watir
> > OpenQA.
> >
> > I have added test data into a sheet "Sheet4"
> > Sheet4 has columns with data as follows.
> >
> > AB   C
> > D  E
> > Type   Priority  Select_Users
> > Remove_Users  Yes
> >  Information High  User1
> > User1 No
> >  Medium
> > User2  User2
> >   Low  User3
> > User4
> > User5
> >
> > I have to select the
> >Type as "INFORMATIONAL"
> > If Priority as Urgent then Select_Users = all
> > (6rows)
> >else Priority is other than 'urgent then only
> 2
> > records from column Select_Users .
> >
> > I am using the following syntax to get a row of record.
> > $addNotification = xlFile.getRowRecords("A2:E6", "Sheet4")
> > but apart from getting the row, i need to get all records from the column
> > 'Select_Users'.
> >
> > Thanking you very much in adavance.
> >
> > Venky
>
> --
> 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

-- 
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: help me in using Excel DataDrivenTestHarnessExample

2009-12-08 Thread Tiffany Fodor
Hi Venky,

The formatting on your example data was lost, so it's hard to see
exactly what you mean.  It seems you're trying to gather the data
conditionally based on the priority.  I'd suggest grabbing all the
data - make your range A1:E6 - and then deal with the data in your
code.  The headings in row 1 will be the hash keys you use to get at
the data in each cell of the subsequent rows.

$addNotification = xlFile.getRowRecords("A1:E6", "Sheet4")

$addNotification.each do |notification|
  if notification['Priority'] == 'Urgent'
#do whatever you need to with 'Urgent' priority users
  elsif notification['Priority'] == 'High'
#do whatever you need to with 'High' priority users
  else
#do whatever you need to with other users
end

Hope this helps!

-Tiffany


On Dec 8, 6:39 am, venkat  wrote:
>  Can any one please help me out in getting the multi row data from a column
> using watir xls interface class.
>
> I have taken the DataDrivenTestHarnessExample as my source from Watir
> OpenQA.
>
> I have added test data into a sheet "Sheet4"
> Sheet4 has columns with data as follows.
>
> A                        B                       C
> D                              E
> Type                   Priority              Select_Users
> Remove_Users      Yes
>  Information         High                  User1
> User1                     No
>                              Medium
> User2                  User2
>                               Low                  User3
>                                                         User4
>                                                         User5
>
> I have to select the
>                                Type as "INFORMATIONAL"
>                             If Priority as Urgent then Select_Users = all
> (6rows)
>                            else Priority is other than 'urgent then only 2
> records from column Select_Users .
>
> I am using the following syntax to get a row of record.
> $addNotification = xlFile.getRowRecords("A2:E6", "Sheet4")
> but apart from getting the row, i need to get all records from the column
> 'Select_Users'.
>
> Thanking you very much in adavance.
>
> Venky

-- 
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: help required - Re-usable framework watir sql server/oracle database

2009-11-25 Thread Ethan
This script does not seem to have anything to do with Watir. Perhaps there
is a ruby oci8 community that would be better able to help you?
However, the error message seems fairly straightforward - the table or view
does not exist. This seems to mean the 'temp' table, which presumably does
not exist in your database.
Beyond that, I don't know anything about oci8, and this isn't the right
place to ask further questions - if you have questions about Watir, we are
happy to help.

-Ethan

On Wed, Nov 25, 2009 at 07:18, venkat  wrote:

> thanks Tiffany for providing the url for ref. still i am trouble with the
> following error in my script execution.
>
> C:/build/ruby-oci8-2.0.3/ext/oci8/stmt.c:306:in oci8lib.so: ORA-00942:
> table or view does not exist (OCIError)
>  from
> C:/Ruby/lib/ruby/gems/1.8/gems/ruby-oci8-2.0.3-x86-mswin32-60/lib/oci8/oci8.rb:287:in
> `exec'
>  from test3.rb:13
>  from test3.rb:10:in `times'
>  from test3.rb:10
> my script is:
>
> require 'oci8'
> conn = OCI8.new('lup', 'es104', '//192.168.2.3:1521/ORCL')
> i=10
> cursor = conn.parse('insert into temp values (:id,:name)')
> 100.times {
>   cursor.bind_param(':id',i)
>   cursor.bind_param(':name',"Name #{i}")
>   cursor.exec
>   i +=1
> }
> cursor.close
> conn.commit
>
> cursor = conn.exec('SELECT id,name from TEMP');
> while r = cursor.fetch
>   puts " ID: #{r[0]} = #{r[1]}"
>  end
> cursor.close
> conn.logoff
>
> MY script details:
> Watir
> Oci8
> functionality: login to my application (login_id and login_password are
> variables)
> my oracle table contains users table with column names login_id,
> login_password
> i am trying insert the login, password field to temp table and binding as
> strings to pass the variable to my login script.
> I appreciate if anyone corrects the script to make it pass.
> thanks,
> venky
> On Tue, Nov 24, 2009 at 8:44 PM, Tiffany Fodor wrote:
>
>>
>> Hi Venky!
>>
>> If you were looking at my example Test::Unit harness:
>>
>>
>> http://wiki.openqa.org/display/WTR/Test+Unit+Excel+Data+Driven+Framework+with+Database+Verifications
>>
>> DataVerification.rb connects to SQL and Oracle, retrieves value using
>> select statements and verifies then against an expected value.  You
>> could also use this to retrieve test data once it's populated in your
>> database.
>>
>> If this doesn't do what you need it to, you may want to look into
>> using the ActiveRecord class.  Note that ActiveRecord is it's own Ruby
>> project, not part or Watir.  I'm moving that way myself, as
>> ActiveRecord seems more solid than the DBI class.
>>
>> Hope this helps!
>>
>> -Tiffany
>>
>> On Nov 24, 2:44 am, venkat  wrote:
>> > Hi,
>> >
>> > I am venkat, started using watir for the last 3 to 4 weeks. I understand
>> > basic watir scripting since opening of the browser to navigating pages
>> by
>> > identifying the elements etc. and I feel WATiR is an excellent tool.
>> Also I
>> > have gone through the datadriven framework with excel data examples.
>> >
>> > I have searched in google for examples, blogs, code snippets for a
>> framework
>> > that built using watir with sql server or watir with oracle but failed
>> to
>> > get it. I can see the test code to establish connections from watir to
>> sql
>> > dbi or oracle but further details are not much.
>> >
>> > At this point I request you to please help me out in finding a good
>> > framework that uses watir with sql or oracle database that can be
>> re-usable
>> > with modifications kind of.
>> >
>> > I appreciate if any one helps.
>> >
>> > Thanks and hope to see your mail.
>> >
>> > Regards,
>> > Venky
>>
>
>
> >
>

--~--~-~--~~~---~--~~
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: help required - Re-usable framework watir sql server/oracle database

2009-11-25 Thread venkat
thanks Tiffany for providing the url for ref. still i am trouble with the
following error in my script execution.

C:/build/ruby-oci8-2.0.3/ext/oci8/stmt.c:306:in oci8lib.so: ORA-00942: table
or view does not exist (OCIError)
 from
C:/Ruby/lib/ruby/gems/1.8/gems/ruby-oci8-2.0.3-x86-mswin32-60/lib/oci8/oci8.rb:287:in
`exec'
 from test3.rb:13
 from test3.rb:10:in `times'
 from test3.rb:10
my script is:

require 'oci8'
conn = OCI8.new('lup', 'es104', '//192.168.2.3:1521/ORCL')
i=10
cursor = conn.parse('insert into temp values (:id,:name)')
100.times {
  cursor.bind_param(':id',i)
  cursor.bind_param(':name',"Name #{i}")
  cursor.exec
  i +=1
}
cursor.close
conn.commit

cursor = conn.exec('SELECT id,name from TEMP');
while r = cursor.fetch
  puts " ID: #{r[0]} = #{r[1]}"
 end
cursor.close
conn.logoff

MY script details:
Watir
Oci8
functionality: login to my application (login_id and login_password are
variables)
my oracle table contains users table with column names login_id,
login_password
i am trying insert the login, password field to temp table and binding as
strings to pass the variable to my login script.
I appreciate if anyone corrects the script to make it pass.
thanks,
venky
On Tue, Nov 24, 2009 at 8:44 PM, Tiffany Fodor  wrote:

>
> Hi Venky!
>
> If you were looking at my example Test::Unit harness:
>
>
> http://wiki.openqa.org/display/WTR/Test+Unit+Excel+Data+Driven+Framework+with+Database+Verifications
>
> DataVerification.rb connects to SQL and Oracle, retrieves value using
> select statements and verifies then against an expected value.  You
> could also use this to retrieve test data once it's populated in your
> database.
>
> If this doesn't do what you need it to, you may want to look into
> using the ActiveRecord class.  Note that ActiveRecord is it's own Ruby
> project, not part or Watir.  I'm moving that way myself, as
> ActiveRecord seems more solid than the DBI class.
>
> Hope this helps!
>
> -Tiffany
>
> On Nov 24, 2:44 am, venkat  wrote:
> > Hi,
> >
> > I am venkat, started using watir for the last 3 to 4 weeks. I understand
> > basic watir scripting since opening of the browser to navigating pages by
> > identifying the elements etc. and I feel WATiR is an excellent tool. Also
> I
> > have gone through the datadriven framework with excel data examples.
> >
> > I have searched in google for examples, blogs, code snippets for a
> framework
> > that built using watir with sql server or watir with oracle but failed to
> > get it. I can see the test code to establish connections from watir to
> sql
> > dbi or oracle but further details are not much.
> >
> > At this point I request you to please help me out in finding a good
> > framework that uses watir with sql or oracle database that can be
> re-usable
> > with modifications kind of.
> >
> > I appreciate if any one helps.
> >
> > Thanks and hope to see your mail.
> >
> > Regards,
> > Venky
>  >
>

--~--~-~--~~~---~--~~
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: help required - Re-usable framework watir sql server/oracle database

2009-11-24 Thread Tiffany Fodor

Hi Venky!

If you were looking at my example Test::Unit harness:

http://wiki.openqa.org/display/WTR/Test+Unit+Excel+Data+Driven+Framework+with+Database+Verifications

DataVerification.rb connects to SQL and Oracle, retrieves value using
select statements and verifies then against an expected value.  You
could also use this to retrieve test data once it's populated in your
database.

If this doesn't do what you need it to, you may want to look into
using the ActiveRecord class.  Note that ActiveRecord is it's own Ruby
project, not part or Watir.  I'm moving that way myself, as
ActiveRecord seems more solid than the DBI class.

Hope this helps!

-Tiffany

On Nov 24, 2:44 am, venkat  wrote:
> Hi,
>
> I am venkat, started using watir for the last 3 to 4 weeks. I understand
> basic watir scripting since opening of the browser to navigating pages by
> identifying the elements etc. and I feel WATiR is an excellent tool. Also I
> have gone through the datadriven framework with excel data examples.
>
> I have searched in google for examples, blogs, code snippets for a framework
> that built using watir with sql server or watir with oracle but failed to
> get it. I can see the test code to establish connections from watir to sql
> dbi or oracle but further details are not much.
>
> At this point I request you to please help me out in finding a good
> framework that uses watir with sql or oracle database that can be re-usable
> with modifications kind of.
>
> I appreciate if any one helps.
>
> Thanks and hope to see your mail.
>
> Regards,
> Venky
--~--~-~--~~~---~--~~
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: Help with tables

2009-11-23 Thread xguarder

Thanks again for the suggestion. I'll be sure to try this out tomorrow
morning

Much appreciated!

On Nov 23, 2:22 pm, Tiffany Fodor  wrote:
> Hi George!
>
> I couldn't get the .text method to work without looping through the
> rows in a table, here's how I did it:
>
> my_table = browser.table(:id, 'table_id')
>
> my_table.rows.each do |row|
>   if row.text.include?('Something')
>     my_text = row[3].text
>   end
> end
>
> You'll need to figure out which column of the table the text is in, I
> assumed column 3 above.
>
> Hope this helps!
>
> -Tiffany
>
> On Nov 23, 11:00 am, xguarder  wrote:
>
> > Hello, can anyone give me some quick tips on how to do the following:
>
> > Say I am searching for the text "Something", which is in the first
> > column of the table. Exact row and table index won't be known up
> > front.
>
> > So I have table.row(:text, "Something") thus far
>
> > What method can I use to retrieve the text displayed that I know is in
> > the column next to "Something"?
>
> > Thanks in advance!
--~--~-~--~~~---~--~~
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: Help with tables

2009-11-23 Thread Tiffany Fodor

Hi George!

I couldn't get the .text method to work without looping through the
rows in a table, here's how I did it:

my_table = browser.table(:id, 'table_id')

my_table.rows.each do |row|
  if row.text.include?('Something')
my_text = row[3].text
  end
end

You'll need to figure out which column of the table the text is in, I
assumed column 3 above.

Hope this helps!

-Tiffany


On Nov 23, 11:00 am, xguarder  wrote:
> Hello, can anyone give me some quick tips on how to do the following:
>
> Say I am searching for the text "Something", which is in the first
> column of the table. Exact row and table index won't be known up
> front.
>
> So I have table.row(:text, "Something") thus far
>
> What method can I use to retrieve the text displayed that I know is in
> the column next to "Something"?
>
> Thanks in advance!
--~--~-~--~~~---~--~~
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: Help with tables

2009-11-23 Thread George

I'm assuming that the text 'Something' is actually in a row's cell,
and you're looking for the following cell text, correct?

If 'Something' is only going to be listed once in the entire table,
then this should work for you:

puts @browser.table(:id, 'tableID').cell(:after?, @browser.cell(:text,
'Something')).text





On Nov 23, 10:00 am, xguarder  wrote:
> Hello, can anyone give me some quick tips on how to do the following:
>
> Say I am searching for the text "Something", which is in the first
> column of the table. Exact row and table index won't be known up
> front.
>
> So I have table.row(:text, "Something") thus far
>
> What method can I use to retrieve the text displayed that I know is in
> the column next to "Something"?
>
> Thanks in advance!
--~--~-~--~~~---~--~~
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: Help with tables

2009-11-23 Thread George

I'm assuming that the text 'Something' is actually in a row's cell,
and you're looking for the following cell text, correct?

If 'Something' is only going to be listed once in the entire table,
then this should work for you:

puts @browser.table(:id, 'tableID').cell(:after?, @browser.cell(:text,
'Las Vegas, NV')).text

On Nov 23, 10:00 am, xguarder  wrote:
> Hello, can anyone give me some quick tips on how to do the following:
>
> Say I am searching for the text "Something", which is in the first
> column of the table. Exact row and table index won't be known up
> front.
>
> So I have table.row(:text, "Something") thus far
>
> What method can I use to retrieve the text displayed that I know is in
> the column next to "Something"?
>
> Thanks in advance!
--~--~-~--~~~---~--~~
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: Help required regarding link method

2009-10-23 Thread Amit Kulkarni
Thanks Wesley,
I will try it out and let you know.
Thanks for thee help. :-)

2009/10/23 Wesley Chen 

> I tried all the methods below, they work:
> 1. $ie.link(:after?, $ie.image(:title, "Photogallerysanity1")).click
> 2. $ie.link(:after?, $ie.image(:alt, "Photogallerysanity1")).click
> 3. $ie.link(:after?, $ie.image(:src, /s3.amazonaws.com
> \/staging-brandpotion-prints/)).click
> 4. $ie.image(:alt, "Photogallerysanity1").parent.link(:index, 1).click
> 5. $ie.image(:alt, "Photogallerysanity1").parent.link(:text, "Edit").click
> 6. $ie.image(:alt, "Photogallerysanity1").parent.link(:class =>
> "underline", :index =>1).click
>
> We don't need use Xpth here.
>
>
> Thanks.
> Wesley Chen.
> For life, the easier, the better.
>
>
> 2009/10/23 Amit Kulkarni 
>
> Thanks for the help.
>> Following is the page source.
>>
>>  
>>  
>>
>>
>>  
>> 
>>
>>
>>  
>>   welcome > onclick="window.open(this.href);return false;" title="nikeman">nikeman 
>>    
>>
>>
>>  
>>   
>>
>>  
>>
>>  
>>
>>
>> 
>>  Nikes Active features
>>
>>
>>  
>>  Photogallery
>>
>>  
>>
>>
>>
>> 
>>  > action="/Nikes/photo_gallery/attachments/delete_multiple" method="post">
>>
>>
>>  
>>   Photogallery
>>
>>   
>> 
>>
>>  
>> > onclick="if(!validate_delete('input'))  { alert('Please select a photo'); 
>> return false;} " />
>>
>> > href="/Nikes/photo_gallery/attachments/new?media=print" class="ar-normal" 
>> title="Add new photo">Add new photo
>>
>>
>>   
>> 
>> 
>>
>>   *
>> 
>>
>>   > name="attachment[218]" type="checkbox" value="1" />
>>
>>
>>   > src="http://s3.amazonaws.com/staging-brandpotion-prints/images/63/large_thumb.jpg";
>>  title="Photogallerysanity1" />
>>
>> *
>>
>> *  > href="/Nikes/photo_gallery/attachments/218/edit?media=print" 
>> class="underline">Edit *
>>
>>   
>>
>>
>>  
>>  
>>  
>>
>>
>>
>> 
>>  
>>
>>  
>> 
>>
>> 
>>
>>
>>
>>
>> 2009/10/23 Wesley Chen 
>>
>> Your this question has taken so much time.
>>> I think you still have not described your question clearly enough.
>>>
>>> For the html code you provided, of course it is easy for us to help you
>>> to locate.
>>>
>>> Please give us the whole page source you failed to locate, and show the
>>> error message you got.
>>>
>>>
>>> Thanks.
>>> Wesley Chen.
>>> For life, the easier, the better.
>>>
>>>
>>> 2009/10/22 Amit Kulkarni 
>>>
>>> Hi Angrez,
 I tried with the link you provided but it shows below error

 Unable to locate element, using :xpath,
 "//i...@title='Photogallerysanity']/"
 (Watir::Exception::UnknownObjectException)
 Same error appears when i use .click or .flash


 On Thu, Oct 22, 2009 at 5:14 PM, Angrez Singh  wrote:

> can you try this?
> Browser.link(:xpath,"//i...@title='Photogallerysanity']/a").flash() or
> click()
>
> - Angrez
>
> On Thu, Oct 22, 2009 at 5:03 PM, Amit Kulkarni <
> amitkkulkarni...@gmail.com> wrote:
>
>> I also tried to use using Xpath. i.e.
>> Browser.link(:xpath,"//a...@href='/Nikes/photo_gallery/attachments/218/edit?media=print']/").text
>> # =>  "Edit"
>>
>> Still no success.Is there something wrong with the above code?
>>
>>
>>
>> On Thu, Oct 22, 2009 at 4:55 PM, Amit Kulkarni <
>> amitkkulkarni...@gmail.com> wrote:
>>
>>> Sorry again,
>>> Yes i read the tutorial.
>>> I tried some stunts but no success.So posted my queries here.
>>>
>>>
>>>
>>> On Thu, Oct 22, 2009 at 4:48 PM, Željko Filipin <
>>> zeljko.fili...@wa-research.ch> wrote:
>>>
 On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin <
 zeljko.fili...@wa-research.ch> wrote:
 > Have you read the tutorial?
 > http://wiki.openqa.org/display/WTR/Tutorial

 You did not answer this.


 Željko



>>>
>>
>>
>>
>
>
>



>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this gr

[wtr-general] Re: Help required regarding link method

2009-10-23 Thread Wesley Chen
I tried all the methods below, they work:
1. $ie.link(:after?, $ie.image(:title, "Photogallerysanity1")).click
2. $ie.link(:after?, $ie.image(:alt, "Photogallerysanity1")).click
3. $ie.link(:after?, $ie.image(:src, /s3.amazonaws.com
\/staging-brandpotion-prints/)).click
4. $ie.image(:alt, "Photogallerysanity1").parent.link(:index, 1).click
5. $ie.image(:alt, "Photogallerysanity1").parent.link(:text, "Edit").click
6. $ie.image(:alt, "Photogallerysanity1").parent.link(:class => "underline",
:index =>1).click

We don't need use Xpth here.

Thanks.
Wesley Chen.
For life, the easier, the better.


2009/10/23 Amit Kulkarni 

> Thanks for the help.
> Following is the page source.
>
>  
>  
>
>  
> 
>
>   
>   welcome  onclick="window.open(this.href);return false;" title="nikeman">nikeman 
>    
>
>   
>
>
>  
>
>  
>
>
> 
>   Nikes Active features
>
>   
>   Photogallery
>
>   
>
>
>
>  
>action="/Nikes/photo_gallery/attachments/delete_multiple" method="post">
>
>   
>Photogallery
>
>
> 
>
>   
>  onclick="if(!validate_delete('input'))  { alert('Please select a photo'); 
> return false;} " />
>  href="/Nikes/photo_gallery/attachments/new?media=print" class="ar-normal" 
> title="Add new photo">Add new photo
>
>
> 
> 
>   *
> 
>name="attachment[218]" type="checkbox" value="1" />
>
>src="http://s3.amazonaws.com/staging-brandpotion-prints/images/63/large_thumb.jpg";
>  title="Photogallerysanity1" />
> *
>
> *   href="/Nikes/photo_gallery/attachments/218/edit?media=print" 
> class="underline">Edit *
>   
>
>  
>   
>  
>
>
> 
>  
>
>  
> 
>
> 
>
>
>
>
> 2009/10/23 Wesley Chen 
>
> Your this question has taken so much time.
>> I think you still have not described your question clearly enough.
>>
>> For the html code you provided, of course it is easy for us to help you to
>> locate.
>>
>> Please give us the whole page source you failed to locate, and show the
>> error message you got.
>>
>>
>> Thanks.
>> Wesley Chen.
>> For life, the easier, the better.
>>
>>
>> 2009/10/22 Amit Kulkarni 
>>
>> Hi Angrez,
>>> I tried with the link you provided but it shows below error
>>>
>>> Unable to locate element, using :xpath,
>>> "//i...@title='Photogallerysanity']/"
>>> (Watir::Exception::UnknownObjectException)
>>> Same error appears when i use .click or .flash
>>>
>>>
>>> On Thu, Oct 22, 2009 at 5:14 PM, Angrez Singh  wrote:
>>>
 can you try this?
 Browser.link(:xpath,"//i...@title='Photogallerysanity']/a").flash() or
 click()

 - Angrez

 On Thu, Oct 22, 2009 at 5:03 PM, Amit Kulkarni <
 amitkkulkarni...@gmail.com> wrote:

> I also tried to use using Xpath. i.e.
> Browser.link(:xpath,"//a...@href='/Nikes/photo_gallery/attachments/218/edit?media=print']/").text
> # =>  "Edit"
>
> Still no success.Is there something wrong with the above code?
>
>
>
> On Thu, Oct 22, 2009 at 4:55 PM, Amit Kulkarni <
> amitkkulkarni...@gmail.com> wrote:
>
>> Sorry again,
>> Yes i read the tutorial.
>> I tried some stunts but no success.So posted my queries here.
>>
>>
>>
>> On Thu, Oct 22, 2009 at 4:48 PM, Željko Filipin <
>> zeljko.fili...@wa-research.ch> wrote:
>>
>>> On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin <
>>> zeljko.fili...@wa-research.ch> wrote:
>>> > Have you read the tutorial?
>>> > http://wiki.openqa.org/display/WTR/Tutorial
>>>
>>> You did not answer this.
>>>
>>>
>>> Ž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: Help required regarding link method

2009-10-23 Thread Amit Kulkarni
Thanks for the help.
Following is the page source.

 
 
 


  welcome nikeman    

 

 
 


Nikes Active features

Photogallery



   
   


 Photogallery
 




Add new photo
 


  *
  
  http://s3.amazonaws.com/staging-brandpotion-prints/images/63/large_thumb.jpg";
title="Photogallerysanity1" />
*

*  Edit *
  
 

 



 

 






2009/10/23 Wesley Chen 

> Your this question has taken so much time.
> I think you still have not described your question clearly enough.
>
> For the html code you provided, of course it is easy for us to help you to
> locate.
>
> Please give us the whole page source you failed to locate, and show the
> error message you got.
>
>
> Thanks.
> Wesley Chen.
> For life, the easier, the better.
>
>
> 2009/10/22 Amit Kulkarni 
>
> Hi Angrez,
>> I tried with the link you provided but it shows below error
>>
>> Unable to locate element, using :xpath,
>> "//i...@title='Photogallerysanity']/"
>> (Watir::Exception::UnknownObjectException)
>> Same error appears when i use .click or .flash
>>
>>
>> On Thu, Oct 22, 2009 at 5:14 PM, Angrez Singh  wrote:
>>
>>> can you try this?
>>> Browser.link(:xpath,"//i...@title='Photogallerysanity']/a").flash() or
>>> click()
>>>
>>> - Angrez
>>>
>>> On Thu, Oct 22, 2009 at 5:03 PM, Amit Kulkarni <
>>> amitkkulkarni...@gmail.com> wrote:
>>>
 I also tried to use using Xpath. i.e.
 Browser.link(:xpath,"//a...@href='/Nikes/photo_gallery/attachments/218/edit?media=print']/").text
 # =>  "Edit"

 Still no success.Is there something wrong with the above code?



 On Thu, Oct 22, 2009 at 4:55 PM, Amit Kulkarni <
 amitkkulkarni...@gmail.com> wrote:

> Sorry again,
> Yes i read the tutorial.
> I tried some stunts but no success.So posted my queries here.
>
>
>
> On Thu, Oct 22, 2009 at 4:48 PM, Željko Filipin <
> zeljko.fili...@wa-research.ch> wrote:
>
>> On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin <
>> zeljko.fili...@wa-research.ch> wrote:
>> > Have you read the tutorial?
>> > http://wiki.openqa.org/display/WTR/Tutorial
>>
>> You did not answer this.
>>
>>
>> Ž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: Help required regarding link method

2009-10-22 Thread Wesley Chen
Your this question has taken so much time.
I think you still have not described your question clearly enough.

For the html code you provided, of course it is easy for us to help you to
locate.

Please give us the whole page source you failed to locate, and show the
error message you got.


Thanks.
Wesley Chen.
For life, the easier, the better.


2009/10/22 Amit Kulkarni 

> Hi Angrez,
> I tried with the link you provided but it shows below error
>
> Unable to locate element, using :xpath,
> "//i...@title='Photogallerysanity']/"
> (Watir::Exception::UnknownObjectException)
> Same error appears when i use .click or .flash
>
>
> On Thu, Oct 22, 2009 at 5:14 PM, Angrez Singh  wrote:
>
>> can you try this?
>> Browser.link(:xpath,"//i...@title='Photogallerysanity']/a").flash() or
>> click()
>>
>> - Angrez
>>
>> On Thu, Oct 22, 2009 at 5:03 PM, Amit Kulkarni <
>> amitkkulkarni...@gmail.com> wrote:
>>
>>> I also tried to use using Xpath. i.e.
>>> Browser.link(:xpath,"//a...@href='/Nikes/photo_gallery/attachments/218/edit?media=print']/").text
>>> # =>  "Edit"
>>>
>>> Still no success.Is there something wrong with the above code?
>>>
>>>
>>>
>>> On Thu, Oct 22, 2009 at 4:55 PM, Amit Kulkarni <
>>> amitkkulkarni...@gmail.com> wrote:
>>>
 Sorry again,
 Yes i read the tutorial.
 I tried some stunts but no success.So posted my queries here.



 On Thu, Oct 22, 2009 at 4:48 PM, Željko Filipin <
 zeljko.fili...@wa-research.ch> wrote:

> On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin <
> zeljko.fili...@wa-research.ch> wrote:
> > Have you read the tutorial?
> > http://wiki.openqa.org/display/WTR/Tutorial
>
> You did not answer this.
>
>
> Ž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: Help required regarding link method

2009-10-22 Thread Amit Kulkarni
Hi Angrez,
I tried with the link you provided but it shows below error

Unable to locate element, using :xpath,
"//i...@title='Photogallerysanity']/"
(Watir::Exception::UnknownObjectException)
Same error appears when i use .click or .flash

On Thu, Oct 22, 2009 at 5:14 PM, Angrez Singh  wrote:

> can you try this?
> Browser.link(:xpath,"//i...@title='Photogallerysanity']/a").flash() or
> click()
>
> - Angrez
>
> On Thu, Oct 22, 2009 at 5:03 PM, Amit Kulkarni  > wrote:
>
>> I also tried to use using Xpath. i.e.
>> Browser.link(:xpath,"//a...@href='/Nikes/photo_gallery/attachments/218/edit?media=print']/").text
>> # =>  "Edit"
>>
>> Still no success.Is there something wrong with the above code?
>>
>>
>>
>> On Thu, Oct 22, 2009 at 4:55 PM, Amit Kulkarni <
>> amitkkulkarni...@gmail.com> wrote:
>>
>>> Sorry again,
>>> Yes i read the tutorial.
>>> I tried some stunts but no success.So posted my queries here.
>>>
>>>
>>>
>>> On Thu, Oct 22, 2009 at 4:48 PM, Željko Filipin <
>>> zeljko.fili...@wa-research.ch> wrote:
>>>
 On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin <
 zeljko.fili...@wa-research.ch> wrote:
 > Have you read the tutorial?
 > http://wiki.openqa.org/display/WTR/Tutorial

 You did not answer this.


 Ž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: Help required regarding link method

2009-10-22 Thread Angrez Singh
can you try this?
Browser.link(:xpath,"//i...@title='Photogallerysanity']/a").flash() or
click()

- Angrez

On Thu, Oct 22, 2009 at 5:03 PM, Amit Kulkarni
wrote:

> I also tried to use using Xpath. i.e.
> Browser.link(:xpath,"//a...@href='/Nikes/photo_gallery/attachments/218/edit?media=print']/").text
> # =>  "Edit"
>
> Still no success.Is there something wrong with the above code?
>
>
>
> On Thu, Oct 22, 2009 at 4:55 PM, Amit Kulkarni  > wrote:
>
>> Sorry again,
>> Yes i read the tutorial.
>> I tried some stunts but no success.So posted my queries here.
>>
>>
>>
>> On Thu, Oct 22, 2009 at 4:48 PM, Željko Filipin <
>> zeljko.fili...@wa-research.ch> wrote:
>>
>>> On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin <
>>> zeljko.fili...@wa-research.ch> wrote:
>>> > Have you read the tutorial?
>>> > http://wiki.openqa.org/display/WTR/Tutorial
>>>
>>> You did not answer this.
>>>
>>>
>>> Ž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: Help required regarding link method

2009-10-22 Thread Amit Kulkarni
I also tried to use using Xpath. i.e.
Browser.link(:xpath,"//a...@href='/Nikes/photo_gallery/attachments/218/edit?media=print']/").text
# =>  "Edit"

Still no success.Is there something wrong with the above code?


On Thu, Oct 22, 2009 at 4:55 PM, Amit Kulkarni
wrote:

> Sorry again,
> Yes i read the tutorial.
> I tried some stunts but no success.So posted my queries here.
>
>
>
> On Thu, Oct 22, 2009 at 4:48 PM, Željko Filipin <
> zeljko.fili...@wa-research.ch> wrote:
>
>> On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin <
>> zeljko.fili...@wa-research.ch> wrote:
>> > Have you read the tutorial?
>> > http://wiki.openqa.org/display/WTR/Tutorial
>>
>> You did not answer this.
>>
>>
>> Ž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: Help required regarding link method

2009-10-22 Thread Amit Kulkarni
Sorry again,
Yes i read the tutorial.
I tried some stunts but no success.So posted my queries here.


On Thu, Oct 22, 2009 at 4:48 PM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin <
> zeljko.fili...@wa-research.ch> wrote:
> > Have you read the tutorial?
> > http://wiki.openqa.org/display/WTR/Tutorial
>
> You did not answer this.
>
>
> Ž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: Help required regarding link method

2009-10-22 Thread Željko Filipin
On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:
> Have you read the tutorial?
> http://wiki.openqa.org/display/WTR/Tutorial

You did not answer this.

Ž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: Help required regarding link method

2009-10-22 Thread Željko Filipin
On Thu, Oct 22, 2009 at 1:10 PM, Amit Kulkarni 
wrote:
> Even i try to flash any object it does not.
> Can you tell me what is the problem?

No.

It could help if the application is public and you provided the link to it,
so I could take a look.

Ž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: Help required regarding link method

2009-10-22 Thread Amit Kulkarni
Sorry for the trouble.
I got it that my queries are similar.
But i dont know why is it not working on my side.

No my application does not use frames.

Even i try to flash any object it does not.
Can you tell me what is the problem?

On Thu, Oct 22, 2009 at 4:17 PM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> On Thu, Oct 22, 2009 at 12:36 PM, Amit Kulkarni <
> amitkkulkarni...@gmail.com> wrote:
> > I tried browser.link(:after?, browser.image(:title,
> "Photogallerysanity")).click but no success
>
> Amit,
>
> You have posted a few very similar questions in the last two days. Have you
> read the tutorial?
>
> http://wiki.openqa.org/display/WTR/Tutorial
>
> Does your application use frames? I tested the code I posted with html that
> you have provided, and it worked.
>
> Ž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: Help required regarding link method

2009-10-22 Thread Željko Filipin
On Thu, Oct 22, 2009 at 12:36 PM, Amit Kulkarni 
wrote:
> I tried browser.link(:after?, browser.image(:title,
"Photogallerysanity")).click but no success

Amit,

You have posted a few very similar questions in the last two days. Have you
read the tutorial?

http://wiki.openqa.org/display/WTR/Tutorial

Does your application use frames? I tested the code I posted with html that
you have provided, and it worked.

Ž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: Help required regarding link method

2009-10-22 Thread Amit Kulkarni
Hi Željko,
I tried browser.link(:after?, browser.image(:title,
"Photogallerysanity")).click but no success
I also tried using .flash method but it does not flash anything.
Can you please tell me what is going wrong?

On Thu, Oct 22, 2009 at 1:40 PM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> On Thu, Oct 22, 2009 at 10:05 AM, Amit Kulkarni <
> amitkkulkarni...@gmail.com> wrote:
> > i want to  recognize this Edit link using the  image title.
>
> browser.link(:after?, browser.image(:title, "Photogallerysanity")).click
>
> Ž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: Help required regarding link method

2009-10-22 Thread Željko Filipin
On Thu, Oct 22, 2009 at 10:05 AM, Amit Kulkarni 
wrote:
> i want to  recognize this Edit link using the  image title.

browser.link(:after?, browser.image(:title, "Photogallerysanity")).click

Ž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: Help selecting elements of a drop down list when the site uses Javascript/ASP.net

2009-08-28 Thread Chuck van der Linden

HTML SelectList elements have two 'parameters' as it were for each
item on the list.  a text lable that is displayed to the user, and an
underlying 'value' that is returned in the HTTP request when that list
item is selected.

I think you are confusing the two.

Try looking at the actual HTML for the selection list and you'll see
both the text 'label' of the list item, and the displayed value.

To select the n'th element in the list use

brower.select_list
(:name,"FacsimileSearchControl1:FromDateDropdownlist­").select_item_in_select_list
(:index, n)

potentially you might have to use n-1  I'm told that  firewatir uses
'zero based' index counting, where Watir is 'one based', but I don't
know if this is one of those cases where watir and firewatir are still
different or not.



On Aug 26, 5:35 pm, Doodle  wrote:
> Thanks for your response, Chuck.
>
> I tried clearing the selection first, and that didn't seem to make a
> difference. The changing of the dropdown box does in fact trigger a
> postback:
>
> onchange=javascript:setTimeout('__doPostBack
> (\'FacsimileSearchControl1$FromDateDropdownlist\',\'\')', 0)
>
> I am afraid I'm a bit out of my element in understanding this part. I
> tried adding the sleep commands in as well, and that didn't help
> either. The thing that confuses me is that, when you manually open the
> site (which, btw, is a public site for looking at detailed reports
> about banks), the dropdown list is populated with dates, such as
> "06/31/2009". Yet, when I load up the options of the dropdown into an
> array and put that out, the array contains these values:
>
> 91
> 111
> 98
> 106
> 101
> 99
> 116
> 32
> 72
> 84
> 77
> 76
> 79
>
> I assume these values somehow drive the javascript which populates the
> dropdown. But I have not figured out a way to simply get at the nth
> element in the dropdown.
>
> Do you have any ideas? I really appreciate the help!
>
> On Aug 24, 11:41 am, Chuck van der Linden  wrote:
>
>
>
> > Try clearing the current selection, before selecting another value in
> > the selection list.
>
> > Also since picking the radio button causes the page to re-render (or
> > is it a postback?), you might need to put in a small wait for a second
> > or two after doing that to give the browser a chance to do it's thing
> > before you start populating the search field and ripping through the
> > from-dates
>
> > The same goes for after firing the onchange, that initiates some kind
> > of re-render or postback (I'd have to be running fiddler to see if
> > it's actually hitting the server) and you might need a allow a little
> > time for that to take place.
>
> > Have you tried using an IRB session to walk through this manually so
> > you can see what steps are working and what steps are not working?
> > (you'd probably want to omit the loops, but otoh you could use
> > something like
> >    puts dropdate.options
> > to see if it's able to get the list of options for the select list
>
> > you never really indicated what happens when you run the code above
> > (and given the site involved, I'm NOT going to try it for myself ;-)
> > are you getting some kind or error at any point, or is the site just
> > not reacting to the onchange, or what?
>
> > On Aug 21, 2:40 pm, Doodle  wrote:
>
> > > Hi everyone, I'm loving Watir so far but running into a wall with a
> > > certain site. The site uses javascript/asp.net to control a drop down
> > > list. I have gone crazy trying different things to use select_list,
> > > but nothing seems to work. I just want to be able to select the nth
> > > element in a dropdown list, but if I look for certain text it won't
> > > work, and if I grab the contents and try to set it that way it also
> > > doesn't work. I suspect it has to do with using javascript and the
> > > fire_event function, but this does not seem to be very well
> > > documented.
>
> > > Also, I am a novice ruby code so any tips or feedback in terms of the
> > > general coding style would be greatly appreciated. Thanks!
>
> > > Here is a copy of the code I'm using, presented below the line.
>
> > > 'C:\BankData\failedbankcertcodes.txt' is a txt file containing just
> > > these lines:
>
> > > 26870
> > > 26535
> > > 28344
> > > 27011
> > > 33901
> > > 34194
> > > 34881
> > > 23556
> > > 22574
> > > 18659
> > > 34043
> > > 32069
> > > 34341
> > > 27367
> > > 23124
> > > 35469
>
> > > _
>
> > > require 'firewatir'
> > > require 'rubygems'
> > > require 'ftools'
> > > include FireWatir
> > > ff=Firefox.new
> > > certlist='C:\BankData\failedbankcertcodes.txt'
>
> > > File.readlines(certlist).each do |line|
> > > urlstring ="https://cdr.ffiec.gov/public/ManageFacsimiles.aspx";
> > > ff.goto(urlstring)
>
> > > ff.radio(:name, "FacsimileSearchControl1:identifierRButton").set
> > > ff.select_list(:name,"FacsimileSearchControl1:uniqueIDDropdown").select
> > > ("FDIC Certificate Number")
> > > ff.text_field(:name, "FacsimileSearchControl1

[wtr-general] Re: Help selecting elements of a drop down list when the site uses Javascript/ASP.net

2009-08-28 Thread Željko Filipin
On Fri, Aug 21, 2009 at 11:40 PM, Doodle  wrote:
>
datedrop=ff.select_list(:name,"FacsimileSearchControl1:FromDateDropdownlist")

No no no. :)

Replace with this, try and let me know if it works now:

def datedrop
  ff.select_list(:name,"FacsimileSearchControl1:FromDateDropdownlist")
end

Ž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: Help selecting elements of a drop down list when the site uses Javascript/ASP.net

2009-08-27 Thread Doodle

Sorry, I thought it was clear in my first post. The site is

https://cdr.ffiec.gov/public/ManageFacsimiles.aspx

I am trying to search through a list of "Cert Codes". For each "Cert
Code", I want to download the file corresponding to each date present
in the date dropdown list and click submit.

On Aug 27, 3:19 am, Željko Filipin 
wrote:
> On Thu, Aug 27, 2009 at 2:35 AM, Doodle  wrote:
> > site (which, btw, is a public site for looking at detailed reports
> > about banks),
>
> Can you send us a link and let us know what you want to do?
>
> Ž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: Help selecting elements of a drop down list when the site uses Javascript/ASP.net

2009-08-27 Thread Željko Filipin
On Thu, Aug 27, 2009 at 2:35 AM, Doodle  wrote:
> site (which, btw, is a public site for looking at detailed reports
> about banks),

Can you send us a link and let us know what you want to do?

Ž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: Help selecting elements of a drop down list when the site uses Javascript/ASP.net

2009-08-26 Thread Doodle

Thanks for your response, Chuck.

I tried clearing the selection first, and that didn't seem to make a
difference. The changing of the dropdown box does in fact trigger a
postback:

onchange=javascript:setTimeout('__doPostBack
(\'FacsimileSearchControl1$FromDateDropdownlist\',\'\')', 0)

I am afraid I'm a bit out of my element in understanding this part. I
tried adding the sleep commands in as well, and that didn't help
either. The thing that confuses me is that, when you manually open the
site (which, btw, is a public site for looking at detailed reports
about banks), the dropdown list is populated with dates, such as
"06/31/2009". Yet, when I load up the options of the dropdown into an
array and put that out, the array contains these values:

91
111
98
106
101
99
116
32
72
84
77
76
79

I assume these values somehow drive the javascript which populates the
dropdown. But I have not figured out a way to simply get at the nth
element in the dropdown.

Do you have any ideas? I really appreciate the help!

On Aug 24, 11:41 am, Chuck van der Linden  wrote:
> Try clearing the current selection, before selecting another value in
> the selection list.
>
> Also since picking the radio button causes the page to re-render (or
> is it a postback?), you might need to put in a small wait for a second
> or two after doing that to give the browser a chance to do it's thing
> before you start populating the search field and ripping through the
> from-dates
>
> The same goes for after firing the onchange, that initiates some kind
> of re-render or postback (I'd have to be running fiddler to see if
> it's actually hitting the server) and you might need a allow a little
> time for that to take place.
>
> Have you tried using an IRB session to walk through this manually so
> you can see what steps are working and what steps are not working?
> (you'd probably want to omit the loops, but otoh you could use
> something like
>    puts dropdate.options
> to see if it's able to get the list of options for the select list
>
> you never really indicated what happens when you run the code above
> (and given the site involved, I'm NOT going to try it for myself ;-)
> are you getting some kind or error at any point, or is the site just
> not reacting to the onchange, or what?
>
> On Aug 21, 2:40 pm, Doodle  wrote:
>
>
>
> > Hi everyone, I'm loving Watir so far but running into a wall with a
> > certain site. The site uses javascript/asp.net to control a drop down
> > list. I have gone crazy trying different things to use select_list,
> > but nothing seems to work. I just want to be able to select the nth
> > element in a dropdown list, but if I look for certain text it won't
> > work, and if I grab the contents and try to set it that way it also
> > doesn't work. I suspect it has to do with using javascript and the
> > fire_event function, but this does not seem to be very well
> > documented.
>
> > Also, I am a novice ruby code so any tips or feedback in terms of the
> > general coding style would be greatly appreciated. Thanks!
>
> > Here is a copy of the code I'm using, presented below the line.
>
> > 'C:\BankData\failedbankcertcodes.txt' is a txt file containing just
> > these lines:
>
> > 26870
> > 26535
> > 28344
> > 27011
> > 33901
> > 34194
> > 34881
> > 23556
> > 22574
> > 18659
> > 34043
> > 32069
> > 34341
> > 27367
> > 23124
> > 35469
>
> > _
>
> > require 'firewatir'
> > require 'rubygems'
> > require 'ftools'
> > include FireWatir
> > ff=Firefox.new
> > certlist='C:\BankData\failedbankcertcodes.txt'
>
> > File.readlines(certlist).each do |line|
> > urlstring ="https://cdr.ffiec.gov/public/ManageFacsimiles.aspx";
> > ff.goto(urlstring)
>
> > ff.radio(:name, "FacsimileSearchControl1:identifierRButton").set
> > ff.select_list(:name,"FacsimileSearchControl1:uniqueIDDropdown").select
> > ("FDIC Certificate Number")
> > ff.text_field(:name, "FacsimileSearchControl1:uniqueIDTextBox").set
> > line
>
> > datedrop=ff.select_list
> > (:name,"FacsimileSearchControl1:FromDateDropdownlist")
> > reportdates=datedrop.options()
>
> > for i in 0..reportdates.size
> > datedrop.set reportdates[i]
> > datedrop.fire_event("onchange")
> > ff.button(:name, "tabStrip:_ctl2").click
> > begin
> > ff.button(:name,
> > "SearchResultsControl1:CallReportDataGrid:_ctl0:_ctl4:MyButton").click
> > ff.radio(:name, "FacsimileDownloadControl1:formatButtonList").set
> > "SDF"
> > ff.button
> > (:name,"FacsimileDownloadControl1:downloadTabStrip:_ctl2").click
>
> > rescue
> > puts reportdates[i]
> > end
> > end
> > end
--~--~-~--~~~---~--~~
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...@

[wtr-general] Re: Help selecting elements of a drop down list when the site uses Javascript/ASP.net

2009-08-24 Thread Chuck van der Linden

Try clearing the current selection, before selecting another value in
the selection list.

Also since picking the radio button causes the page to re-render (or
is it a postback?), you might need to put in a small wait for a second
or two after doing that to give the browser a chance to do it's thing
before you start populating the search field and ripping through the
from-dates

The same goes for after firing the onchange, that initiates some kind
of re-render or postback (I'd have to be running fiddler to see if
it's actually hitting the server) and you might need a allow a little
time for that to take place.

Have you tried using an IRB session to walk through this manually so
you can see what steps are working and what steps are not working?
(you'd probably want to omit the loops, but otoh you could use
something like
   puts dropdate.options
to see if it's able to get the list of options for the select list

you never really indicated what happens when you run the code above
(and given the site involved, I'm NOT going to try it for myself ;-)
are you getting some kind or error at any point, or is the site just
not reacting to the onchange, or what?

On Aug 21, 2:40 pm, Doodle  wrote:
> Hi everyone, I'm loving Watir so far but running into a wall with a
> certain site. The site uses javascript/asp.net to control a drop down
> list. I have gone crazy trying different things to use select_list,
> but nothing seems to work. I just want to be able to select the nth
> element in a dropdown list, but if I look for certain text it won't
> work, and if I grab the contents and try to set it that way it also
> doesn't work. I suspect it has to do with using javascript and the
> fire_event function, but this does not seem to be very well
> documented.
>
> Also, I am a novice ruby code so any tips or feedback in terms of the
> general coding style would be greatly appreciated. Thanks!
>
> Here is a copy of the code I'm using, presented below the line.
>
> 'C:\BankData\failedbankcertcodes.txt' is a txt file containing just
> these lines:
>
> 26870
> 26535
> 28344
> 27011
> 33901
> 34194
> 34881
> 23556
> 22574
> 18659
> 34043
> 32069
> 34341
> 27367
> 23124
> 35469
>
> _
>
> require 'firewatir'
> require 'rubygems'
> require 'ftools'
> include FireWatir
> ff=Firefox.new
> certlist='C:\BankData\failedbankcertcodes.txt'
>
> File.readlines(certlist).each do |line|
> urlstring ="https://cdr.ffiec.gov/public/ManageFacsimiles.aspx";
> ff.goto(urlstring)
>
> ff.radio(:name, "FacsimileSearchControl1:identifierRButton").set
> ff.select_list(:name,"FacsimileSearchControl1:uniqueIDDropdown").select
> ("FDIC Certificate Number")
> ff.text_field(:name, "FacsimileSearchControl1:uniqueIDTextBox").set
> line
>
> datedrop=ff.select_list
> (:name,"FacsimileSearchControl1:FromDateDropdownlist")
> reportdates=datedrop.options()
>
> for i in 0..reportdates.size
> datedrop.set reportdates[i]
> datedrop.fire_event("onchange")
> ff.button(:name, "tabStrip:_ctl2").click
> begin
> ff.button(:name,
> "SearchResultsControl1:CallReportDataGrid:_ctl0:_ctl4:MyButton").click
> ff.radio(:name, "FacsimileDownloadControl1:formatButtonList").set
> "SDF"
> ff.button
> (:name,"FacsimileDownloadControl1:downloadTabStrip:_ctl2").click
>
> rescue
> puts reportdates[i]
> end
> end
> end
--~--~-~--~~~---~--~~
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: Help with class,method,objects

2009-07-31 Thread marekj

if this is the method def

def login(ie)
 login script
 text_field.set(adunme)
 text_field.set(adpwd)
end

then can you explain the line by line intention of this code?





Watirloo: Semantic Page Objects in UseCases
http://github.com/marekj/watirloo/




On Thu, Jul 30, 2009 at 10:29 PM, Rohan Ojha wrote:
> Hi,
>
>
>
> Yaa I am using the same but I have modified it for my usage.
>
>
>
> What I do is :
>
>
>
> class Tax_CheckMapping
>
> def returnExcelData(file,range)
>
>     @range=range
>
>     @file=file
>
>     taxChkOpr=[]
>
>     excelObject=Excel.new
>
>     excelData=excelObject.getRowData(@file,'SCENARIOS-TESTDATA',@range)
>
>     incr_i=0
>
>     excelData.each do |oneRow|
>
>
>
>   taxChkOpr[incr_i]=Tax_CheckOperation.new
>
>   taxChkOpr[incr_i].setUserData(oneRow['Admin User
> Name'].to_s,oneRow['Admin Password'].to_s )
>
>   incr_i=incr_i+1
>
>
>
>     end
>
>     return taxChkOpr
>
>   end
>
>
>
> end
>
>
>
> And in the second class I do the following operations :
>
>
>
> class Tax_CheckOperation
>
>
>
> attr_reader :adunme,:adpwd
>
>
>
> def intialize
>
>
>
>     @adunme=""
>
>     @adpwd=""
>
> end
>
>
>
> def setUserData(adunme,adpwd)
>
> @adunme=adunme
>
> @adpwd=adpwd
>
> end
>
>
>
> def login(ie)
>
>  login script
>
> text_field.set(adunme)
>
> text_field.set(adpwd)
>
> end
>
>
>
> end
>
>
>
>
>
> Whearas in my script :
>
>
>
> taxChkMapper=Tax_CheckMapping.new
>
> taxChkOpr=taxChkMapper.returnExcelData(path of the excel file,’TC1’)
>  >TC1 is my identifier for test cases
>
>
>
> taxChkOpr.each do |eachIns|
>
> eachIns.login(ie)
>
> end
>
>
>
> So per say if my login method is not defined in the class Tax_CheckOperation
> I wont be able to access my variables ‘adunme’ and ‘adpwd’.
>
>
>
> I have also used the ‘’send’’ method as well but that’s not being fruitful
> either,
>
>
>
> Hope now the things are clearer for you guys to help me. Since I am not
> calling the method with the object of the class but instance of an array
> object.
>
>
>
> Thanks
>
> Rohan Ojha
>
>
>
>
>
>
>
>
>
> -Original Message-
> From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com]
> On Behalf Of George
> Sent: Friday, July 31, 2009 8:39 AM
> To: Watir General
> Subject: [wtr-general] Re: Help with class,method,objects
>
>
>
>
>
> Are you using the Excel interface class from Watir's site?
>
>
>
> http://wiki.openqa.org/display/WTR/Excel+interface+class
>
>
>
>
>
> On Jul 29, 9:57 pm, "Rohan Ojha"  wrote:
>
>> Hi All,
>
>>
>
>> I am not too sure whether I should post it here or in a Ruby forum.
>
>>
>
>> But there is a problem that I am facing while scripting a data driven
>> Watir
>
>> suite.
>
>>
>
>> 1)       I have a class (say the base class) wherein I am fetching data
>> from
>
>> excel and storing them in a variable.
>
>>
>
>> 2)       Now there's a generic method in the application which is stored
>> in
>
>> another Ruby file (not in a  class, not in a module)
>
>>
>
>> 3)       I need to call this generic method with the object of the base
>
>> class (since the object has the data allotted to the variables)
>
>>
>
>> 4)       But when I do this it says   "undefined method `methodName' for
>
>> main:Object".
>
>>
>
>> So can somebody help me with this? What can I do so that I can access the
>
>> methods and at the same time the data is set to variables for every row of
>
>> excel sheet.
>
>>
>
>> Thanks in advance.
>
>>
>
>> Thanks,
>
>> Rohan Ojha
>
>>  Blue Star Infotech l*+91 900 4955058l * +91 22 6688 6969 l 6 +91 22 6688
>
>> 6999 l *  <mailto:rohan.o...@bsil.com> rohan.o...@bsil.com
>
>>    <http://www.bsil.com/>www.bsil.com- Where Partnerships Are Built on
>
>> Trust
>
> >
>

--~--~-~--~~~---~--~~
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: Help with class,method,objects

2009-07-30 Thread Rohan Ojha
Hi,

 

Yaa I am using the same but I have modified it for my usage.

 

What I do is :

 


class Tax_CheckMapping

def returnExcelData(file,range)

@range=range

@file=file

taxChkOpr=[]

excelObject=Excel.new

excelData=excelObject.getRowData(@file,'SCENARIOS-TESTDATA',@range)

incr_i=0

excelData.each do |oneRow|

  

  taxChkOpr[incr_i]=Tax_CheckOperation.new

  taxChkOpr[incr_i].setUserData(oneRow['Admin User
Name'].to_s,oneRow['Admin Password'].to_s )

  incr_i=incr_i+1

  

end

return taxChkOpr

  end

  

end

 

And in the second class I do the following operations :

 


class Tax_CheckOperation

 

attr_reader :adunme,:adpwd

 

def intialize



@adunme=""

@adpwd=""

end

 

def setUserData(adunme,adpwd)

@adunme=adunme

@adpwd=adpwd

end

 

def login(ie)

 login script

text_field.set(adunme)

text_field.set(adpwd)

end

 

end

 

 

Whearas in my script :

 


taxChkMapper=Tax_CheckMapping.new

taxChkOpr=taxChkMapper.returnExcelData(path of the excel file,'TC1')
>TC1 is my identifier for test cases

 

taxChkOpr.each do |eachIns|

eachIns.login(ie)

end

 

So per say if my login method is not defined in the class Tax_CheckOperation
I wont be able to access my variables 'adunme' and 'adpwd'.

 

I have also used the ''send'' method as well but that's not being fruitful
either,

 

Hope now the things are clearer for you guys to help me. Since I am not
calling the method with the object of the class but instance of an array
object.

 

Thanks

Rohan Ojha

 

 

 

 

-Original Message-
From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com]
On Behalf Of George
Sent: Friday, July 31, 2009 8:39 AM
To: Watir General
Subject: [wtr-general] Re: Help with class,method,objects

 

 

Are you using the Excel interface class from Watir's site?

 

http://wiki.openqa.org/display/WTR/Excel+interface+class

 

 

On Jul 29, 9:57 pm, "Rohan Ojha"  wrote:

> Hi All,

> 

> I am not too sure whether I should post it here or in a Ruby forum.

> 

> But there is a problem that I am facing while scripting a data driven
Watir

> suite.

> 

> 1)   I have a class (say the base class) wherein I am fetching data
from

> excel and storing them in a variable.

> 

> 2)   Now there's a generic method in the application which is stored
in

> another Ruby file (not in a  class, not in a module)

> 

> 3)   I need to call this generic method with the object of the base

> class (since the object has the data allotted to the variables)

> 

> 4)   But when I do this it says   "undefined method `methodName' for

> main:Object".

> 

> So can somebody help me with this? What can I do so that I can access the

> methods and at the same time the data is set to variables for every row of

> excel sheet.

> 

> Thanks in advance.

> 

> Thanks,

> Rohan Ojha

>  Blue Star Infotech l*+91 900 4955058l * +91 22 6688 6969 l 6 +91 22 6688

> 6999 l *  <mailto:rohan.o...@bsil.com> rohan.o...@bsil.com

><http://www.bsil.com/>www.bsil.com- Where Partnerships Are Built on

> Trust



--~--~-~--~~~---~--~~
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: Help with class,method,objects

2009-07-30 Thread George

Are you using the Excel interface class from Watir's site?

http://wiki.openqa.org/display/WTR/Excel+interface+class


On Jul 29, 9:57 pm, "Rohan Ojha"  wrote:
> Hi All,
>
> I am not too sure whether I should post it here or in a Ruby forum.
>
> But there is a problem that I am facing while scripting a data driven Watir
> suite.
>
> 1)       I have a class (say the base class) wherein I am fetching data from
> excel and storing them in a variable.
>
> 2)       Now there's a generic method in the application which is stored in
> another Ruby file (not in a  class, not in a module)
>
> 3)       I need to call this generic method with the object of the base
> class (since the object has the data allotted to the variables)
>
> 4)       But when I do this it says   "undefined method `methodName' for
> main:Object".
>
> So can somebody help me with this? What can I do so that I can access the
> methods and at the same time the data is set to variables for every row of
> excel sheet.
>
> Thanks in advance.
>
> Thanks,
> Rohan Ojha
>  Blue Star Infotech l*+91 900 4955058l * +91 22 6688 6969 l 6 +91 22 6688
> 6999 l *   rohan.o...@bsil.com
>    www.bsil.com- Where Partnerships Are Built on
> Trust
--~--~-~--~~~---~--~~
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: Help on acessing values in a table

2009-07-28 Thread Chethan

Refer http://wtr.rubyforge.org/rdoc/ look for Watir:table &
watir:tables Class This will give you much about table related
functions.

Thanks,
Chethan

On Jul 28, 1:51 pm, ajil  wrote:
>  border="0" width="100%">
> 
> 
> 
> 
> 
> 
>  valign="middle">
> 
> 
>     2 
>     On site Project Manager
>  
>     Esha 
>     Internal 
>     Normal 
>     e...@gmail.com 
>     Active 
> 
> Reset
> Password
> 
> 
> 
>     1 
>     Test Engineer 
> 
>     USER1
>     Internal 
>     Manager 
>     us...@gmail.com 
>     Active 
> 
>  valign="middle">
> 
> 
>
> +++
>
> I have an extract html code as mentioned above.I have to specifically
> take the values "On site Project Manager" or "Test Engineer" inside
> the td tags (mentioned with )  .Can Somebody help on this ?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



  1   2   >