Re: [wtr-general] Watir webdriver connection timeout

2011-07-29 Thread Dan
Exactly what I was looking for Jari.  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


Re: [wtr-general] Watir webdriver connection timeout

2011-07-29 Thread Dan
Exactly what I was looking for.  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 : Re: Re : Watir is slow with nested frames

2011-07-29 Thread JMI
>I'd ask why in the hell you've created such a website in the first 
>place? :P 
My AUT is not a website, it's a complex application that is deployed via an 
HTML server and can be accessed by thin clients. It is not my creation, it 
is my reality! The html pages I attached to this thread have been created 
just to illustrate the problem.
 
>Can't say for sure though why it's slower than with VB. This would 
>need some debugging to do. 

By digging thought the Watir surce code, (input_elements.rb) I found that 
the method set(value) of the class TextField invokes three other methods 
before actually setting the value of the field: assert_exists, 
assert_enabled and assert_not_readonly (very good!). There exists another 
method in the same class that does almost the same: value=(v). It sets the 
value of the field (as set(value) does), but does not call neither 
assert_enabled nor assert_not_readonly. And it is fast! (To try this, 
replace .set('123456789' by .value = '123456789' in my demo code). So now 
the question is: why the methods assert_enabled and assert_not_readonly (one 
of them or both) are slow for elements located within nested frames! (And 
yes, in VB, equivalents of those methods are fast).
 
To be continued...
 
 

-- 
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] Watir webdriver connection timeout

2011-07-29 Thread Dave McNulla
http://jarib.github.com/watir-webdriver/doc/Watir/Wait.html

require "watir-webdriver/extensions/wait"
sleep #{duration} until(timeout = 30, &block)

 
Wait until the block evaluates to true or times out.

Good luck,

Dave


   

   


   


   


   


   


   


   - 
   - 
   

-- 
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: Re : Watir is slow with nested frames

2011-07-29 Thread Jarmo Pertman
I'd ask why in the hell you've created such a website in the first
place? :P

Can't say for sure though why it's slower than with VB. This would
need some debugging to do.

Jarmo

On Jul 28, 5:53 pm, JMI  wrote:
> And I join the demo files to show the issue. Copy the html files to a
> folder, open 7.html and run test_frame.rb
>
>  0.html
> < 1KViewDownload
>
>  1.html
> < 1KViewDownload
>
>  2.html
> < 1KViewDownload
>
>  3.html
> < 1KViewDownload
>
>  4.html
> < 1KViewDownload
>
>  5.html
> < 1KViewDownload
>
>  6.html
> < 1KViewDownload
>
>  7.html
> < 1KViewDownload
>
>  text.html
> < 1KViewDownload
>
>  test_frame.rb
> < 1KViewDownload

-- 
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] How to know whether a javascript been fired or not?

2011-07-29 Thread Asif Iquebal Sarkar
No, that couldn't help.
I just need to script it down to know whether it's been fired ot not. If
fired then click on OK button, print the number used and try with a new
number.
pseudo code like this
for i in(0..100)
 $ie.text_field(:id,"number_sos").set(i.to_s)
 if($ie.javascript_dialog.exists?)   ## need something like this
 $ie.javascript_dialog.button('OK').click
 puts "Number failed to enter: #{i}"
 end
end
On Fri, Jul 29, 2011 at 5:27 PM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> On Fri, Jul 29, 2011 at 1:55 PM, Asif Iquebal Sarkar 
> wrote:
> > I need to know when the
> > pop up fired and against which number?
>
> Maybe this could help:
>
>
> http://stackoverflow.com/questions/3787555/how-to-find-out-which-javascript-events-fired
>
> Željko
> --
> watir.com - community manager
> watir.com/book - author
> watirpodcast.com - host
>
> --
> 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 & Regards
Asif Iquebal Sarkar
Bhubaneswar, Orissa

-- 
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] How to know whether a javascript been fired or not?

2011-07-29 Thread Željko Filipin
On Fri, Jul 29, 2011 at 1:55 PM, Asif Iquebal Sarkar 
wrote:
> I need to know when the
> pop up fired and against which number?

Maybe this could help:

http://stackoverflow.com/questions/3787555/how-to-find-out-which-javascript-events-fired

Željko
--
watir.com - community manager
watir.com/book - author
watirpodcast.com - host

-- 
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 know whether a javascript been fired or not?

2011-07-29 Thread Asif Iquebal Sarkar
The Application under test has a text field, which will accept
numbers. In some cases a javascript will be fired against numbers
which has been used already stating 'Please try a new number' [with an
"OK" button on it, i.e., the pop up window]. I need to know when the
pop up fired and against which number?
I am using:
Ruby: 1.8.7
Watir: 1.9.2
OS: Windows 7 [32 bit]

-- 
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] Watir webdriver connection timeout

2011-07-29 Thread Jari Bakken
See the section on Internal Timeouts here:

http://code.google.com/p/selenium/wiki/RubyBindings#Timeouts

Den 29. juli 2011 kl. 04:54 skrev Dan :

Is there a configuration for how long Watir-webdriver waits for a response?
 I'm trying to upload a rather large file and the response takes at least
over a minute and I keep getting a timeout error from watir.  Everything I
search for timeout wise is related to waiting for an element to appear, but
not how long the connection persists.

Thanks!
Dan

-- 
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: "unknown property or method 'document' " when navigating to short URLs

2011-07-29 Thread Dave McNulla
When you navigate to those two url's manually through the same browser on 
the same system, do you get the same html page? I've seen problems caused by 
missing qualified domain name in the DNS suffix list.

Dave

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