[wtr-general] Re: how to make a click_no_wait in chrome with watir-webdriver

2011-07-19 Thread thunderzhu...@gmail.com
did i miss something? or watir-webdriver for chrome cannot do this? is
there any substitution for this???

On Jul 15, 4:37 pm, thunderzhu...@gmail.com
thunderzhu...@gmail.com wrote:
 I have a button binding with onclick event. I want to click on this
 button, and click on OK button of the alert pop up. But using
 button.click will block following steps, and i can not find any clue
 that there is a button.click_no_wait to help me with this. Can you
 help me out of this?

 I'm with watir-webdriver 0.2.5 in OS X

-- 
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: how to make a click_no_wait in chrome with watir-webdriver

2011-07-19 Thread Jarmo Pertman
I remember that i simulated #click_no_wait with threads.

Thread.new {do something with the popup}
button.click #trigger the popup
# do something when the popup has killed...

But i'd still recommend to just override the JavaScript alert or
whatever function you're using with #execute_script window.alert =
function() {} something.

I have written a blog post about it some time ago:
http://www.itreallymatters.net/post/1482786902/testing-webpages-with-javascript-popups-correctly

Jarmo

On Jul 19, 10:34 am, thunderzhu...@gmail.com
thunderzhu...@gmail.com wrote:
 did i miss something? or watir-webdriver for chrome cannot do this? is
 there any substitution for this???

 On Jul 15, 4:37 pm, thunderzhu...@gmail.com







 thunderzhu...@gmail.com wrote:
  I have a button binding with onclick event. I want to click on this
  button, and click on OK button of the alert pop up. But using
  button.click will block following steps, and i can not find any clue
  that there is a button.click_no_wait to help me with this. Can you
  help me out of this?

  I'm with watir-webdriver 0.2.5 in OS X

-- 
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: how to select a month/day into that calendar http://calendarview.org/

2011-07-19 Thread Cristina Dumitrescu
I've attached the screen snapshot.

On Tue, Jul 19, 2011 at 1:39 PM, Cristina Dumitrescu 
cristina.watir.toro...@gmail.com wrote:

 Hi,

 we are using that calendar component from http://calendarview.org.

 When I click on a text field the popup calendar shows and I have to pick a
 date.

 I do now know how to select one month/day using watir.

 I attached a screensnapshot from our ui.

 And take a look at
 http://calendarview.org
 Example HTML Output

 We are using divs the calendar popup divs belong to the mac div
 I've try:
 $browser.div(:id, mac).div(:class, calendar popup)

 I do not know how to click on Today button/ click on the right arrow to
 jump to the next month and to select a day.

 Can one help me with that.

 Thanks a lot in advance,
 Cristina






-- 
Cristina

-- 
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] how to select a month/day into that calendar http://calendarview.org/

2011-07-19 Thread Cristina Dumitrescu
Hi,

we are using that calendar component from http://calendarview.org.

When I click on a text field the popup calendar shows and I have to pick a
date.

I do now know how to select one month/day using watir.

I attached a screensnapshot from our ui.

And take a look at
http://calendarview.org
Example HTML Output

We are using divs the calendar popup divs belong to the mac div
I've try:
$browser.div(:id, mac).div(:class, calendar popup)

I do not know how to click on Today button/ click on the right arrow to
jump to the next month and to select a day.

Can one help me with that.

Thanks a lot in advance,
Cristina

-- 
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: how to select a month/day into that calendar http://calendarview.org/

2011-07-19 Thread orde
The Today and arrow links are in cells.  Have you tried to click the
cell?  For example:

$browser.div(:id, mac).div(:class, calendar popup).cell(:text,
Today).click

Hope it helps...

orde

On Jul 19, 10:42 am, Cristina Dumitrescu
cristina.watir.toro...@gmail.com wrote:
 I've attached the screen snapshot.

 On Tue, Jul 19, 2011 at 1:39 PM, Cristina Dumitrescu 









 cristina.watir.toro...@gmail.com wrote:
  Hi,

  we are using that calendar component fromhttp://calendarview.org.

  When I click on a text field the popup calendar shows and I have to pick a
  date.

  I do now know how to select one month/day using watir.

  I attached a screensnapshot from our ui.

  And take a look at
 http://calendarview.org
  Example HTML Output

  We are using divs the calendar popup divs belong to the mac div
  I've try:
  $browser.div(:id, mac).div(:class, calendar popup)

  I do not know how to click on Today button/ click on the right arrow to
  jump to the next month and to select a day.

  Can one help me with that.

  Thanks a lot in advance,
  Cristina

 --
 Cristina

-- 
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: how to select a month/day into that calendar http://calendarview.org/

2011-07-19 Thread Cristina Dumitrescu
c:/ruby187/lib/ruby/gems/gems/1.8/gems/watir-webdriver-0.2.4/lib/watir-webdriver/elements/elements.rb
292: in method_missing: undefined method 'cell' for #Watir::Div

 Do I have any library missing?

I was trying


$browser.div(:id, mac).div(:class, calendar popup,  :index =1
}).cell(:text,Today).click
But I am reciving an error also. Because there are so many divs I think that
I have to specify one div by index?!

On Tue, Jul 19, 2011 at 2:11 PM, orde ohil...@gmail.com wrote:

 The Today and arrow links are in cells.  Have you tried to click the
 cell?  For example:

 $browser.div(:id, mac).div(:class, calendar popup).cell(:text,
 Today).click

 Hope it helps...

 orde

 On Jul 19, 10:42 am, Cristina Dumitrescu
 cristina.watir.toro...@gmail.com wrote:
  I've attached the screen snapshot.
 
  On Tue, Jul 19, 2011 at 1:39 PM, Cristina Dumitrescu 
 
 
 
 
 
 
 
 
 
  cristina.watir.toro...@gmail.com wrote:
   Hi,
 
   we are using that calendar component fromhttp://calendarview.org.
 
   When I click on a text field the popup calendar shows and I have to
 pick a
   date.
 
   I do now know how to select one month/day using watir.
 
   I attached a screensnapshot from our ui.
 
   And take a look at
  http://calendarview.org
   Example HTML Output
 
   We are using divs the calendar popup divs belong to the mac div
   I've try:
   $browser.div(:id, mac).div(:class, calendar popup)
 
   I do not know how to click on Today button/ click on the right arrow
 to
   jump to the next month and to select a day.
 
   Can one help me with that.
 
   Thanks a lot in advance,
   Cristina
 
  --
  Cristina

 --
 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.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com




-- 
Cristina

-- 
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: how to select a month/day into that calendar http://calendarview.org/

2011-07-19 Thread orde
Although I'm not using watir-webdriver, this works for me on
http://calendarview.org (using ruby 1.8.6 + watir 1.9.0 + IE8):

browser.div(:id, 'popupDateField').document.scrollintoview
browser.div(:id, 'popupDateField').click
puts browser.div(:class, calendar popup).cell(:text,
Today).exists? if true  # returns true

I don't know why you're getting the undefined method error since the
webdriver API contains a cell method.

orde



On Jul 19, 11:28 am, Cristina Dumitrescu
cristina.watir.toro...@gmail.com wrote:
 c:/ruby187/lib/ruby/gems/gems/1.8/gems/watir-webdriver-0.2.4/lib/watir-webd 
 river/elements/elements.rb
 292: in method_missing: undefined method 'cell' for #Watir::Div

  Do I have any library missing?

 I was trying

 $browser.div(:id, mac).div(:class, calendar popup,  :index 
 =1}).cell(:text,Today).click

 But I am reciving an error also. Because there are so many divs I think that
 I have to specify one div by index?!









 On Tue, Jul 19, 2011 at 2:11 PM, orde ohil...@gmail.com wrote:
  The Today and arrow links are in cells.  Have you tried to click the
  cell?  For example:

  $browser.div(:id, mac).div(:class, calendar popup).cell(:text,
  Today).click

  Hope it helps...

  orde

  On Jul 19, 10:42 am, Cristina Dumitrescu
  cristina.watir.toro...@gmail.com wrote:
   I've attached the screen snapshot.

   On Tue, Jul 19, 2011 at 1:39 PM, Cristina Dumitrescu 

   cristina.watir.toro...@gmail.com wrote:
Hi,

we are using that calendar component fromhttp://calendarview.org.

When I click on a text field the popup calendar shows and I have to
  pick a
date.

I do now know how to select one month/day using watir.

I attached a screensnapshot from our ui.

And take a look at
   http://calendarview.org
Example HTML Output

We are using divs the calendar popup divs belong to the mac div
I've try:
$browser.div(:id, mac).div(:class, calendar popup)

I do not know how to click on Today button/ click on the right arrow
  to
jump to the next month and to select a day.

Can one help me with that.

Thanks a lot in advance,
Cristina

   --
   Cristina

  --
  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.comhttp://groups.google.com/group/watir-general%0Awatir-general+unsubscr...

 --
 Cristina

-- 
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: how to select a month/day into that calendar http://calendarview.org/

2011-07-19 Thread Jari Bakken
On Tue, Jul 19, 2011 at 8:28 PM, Cristina Dumitrescu
cristina.watir.toro...@gmail.com wrote:
 c:/ruby187/lib/ruby/gems/gems/1.8/gems/watir-webdriver-0.2.4/lib/watir-webdriver/elements/elements.rb
 292: in method_missing: undefined method 'cell' for #Watir::Div

  Do I have any library missing?


watir-webdriver has a slightly revised table API [1]. We only support
calling #cell on TableRows. If you want to locate table cells from
other elements, use the actual tag name, e.g.:

  $browser.div(:id, mac).div(:class, calendar popup).td(:text,Today).click



[1] https://gist.github.com/565553

-- 
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: how to select a month/day into that calendar http://calendarview.org/

2011-07-19 Thread Cristina Dumitrescu
Thanks a lot,

the following are working:
 $browser.div(:id, mac).div(:class, calendar
popup).td(:text,Today).click
$browser.div(:class, calendar popup).td(:text,Today).flash
$browser.div(:class, calendar popup).td(:text,Today).click

$browser.div(:class, calendar popup).tr(:class = days).td(:text =
28).flash
$browser.div(:class, calendar popup).tr(:class = days).td(:text =
28).click
--
But I am failing when I try to click on arrows; I try:

$browser.div(:class, calendar popup).td(:class = button, :text =
).click
or
$browser.div(:class, calendar popup).td(:text,).flash
$browser.div(:class, calendar popup).td(:text,).click

or
$browser.div(:class, calendar popup).td(:xpath = //td[@class='button'
and @text='\']).flash

I am receiving unable to locate the element eror


What I am doing wrong?

Thanks,
Cristina

On Tue, Jul 19, 2011 at 3:26 PM, Jari Bakken jari.bak...@gmail.com wrote:

 On Tue, Jul 19, 2011 at 8:28 PM, Cristina Dumitrescu
 cristina.watir.toro...@gmail.com wrote:
 
 c:/ruby187/lib/ruby/gems/gems/1.8/gems/watir-webdriver-0.2.4/lib/watir-webdriver/elements/elements.rb
  292: in method_missing: undefined method 'cell' for #Watir::Div
 
   Do I have any library missing?
 

 watir-webdriver has a slightly revised table API [1]. We only support
 calling #cell on TableRows. If you want to locate table cells from
 other elements, use the actual tag name, e.g.:

  $browser.div(:id, mac).div(:class, calendar
 popup).td(:text,Today).click



 [1] https://gist.github.com/565553

 --
 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.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com




-- 
Cristina

-- 
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] extended ascii character not entered in IE text field

2011-07-19 Thread Todd A.
 I need to verify enter extended ascii characters into a form field
but it is not working for me

For some reason, when I use a statement like:
browser.text_field(:id,myTextField).set(fö)

what is entered into the field is f.

I've tried variations on the same theme to no effect:
badPass = fö
browser.text_field(:id,myTextField).set(baddPass)
browser.text_field(:id,myTextField).value = badPass

I've also tried the html escape equivalent (for the heck of it), but
that just came through literally.

I also tried the example I found on another thread with the same
effect:
require 'win32ole'
WIN32OLE.codepage = WIN32OLE::CP_UTF8

browser.text_field(:id, 'blah').value='my characters'


Any ideas on how I can get extended ascii characters set into a text
field entry without having to resort to something drastic like copying
an excell cell (as I've also seen as a solution online)?

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


[wtr-general] Re: extended ascii character not entered in IE text field

2011-07-19 Thread Abe Heward
At the top of my scripts I use the magical line:

# coding: UTF-8

After that, extended ASCII should work.

I know it sounds crazy.

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