Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
watir::exception::Timeoutexception
Rutger Geelen
3/5/2008 9:33:00 AM
Hi,
I'm using Watir to do some tests. Depending on the outcome of a test a
java pop appears which I can click using the third method as described
on
http://wiki.openqa.org/display/WTR/JavaScri...
.
My code looks exactly like described there:
# A Better Popup Handler using the latest Watir version. Posted by
Mark_cain@rl.gov
#
require 'watir\contrib\enabled_popup'
#
def startClicker( button , waitTime= 9, user_input=nil )
# get a handle if one exists
hwnd = $ie.enabled_popup(waitTime)
if (hwnd) # yes there is a popup
w = WinClicker.new
if ( user_input )
w.setTextValueForFileNameField( hwnd, "#{user_input}" )
end
# I put this in to see the text being input it is not necessary to
work
sleep 3
# "OK" or whatever the name on the button is
w.clickWindowsButton_hwnd( hwnd, "#{button}" )
#
# this is just cleanup
w=nil
end
end
#
# MAIN APPLICATION CODE
#
$ie = Watir::IE.start( "my_URL" )
# This is whatever object that uses the click method.
# You MUST use the click_no_wait method.
$ie.image( :id, '3' ).click_no_wait
#
# 3rd parameter is optional and is used for input and file dialog boxes.
startClicker( "OK ", 7 , "User Input" )
#
# Main application code follows
# ...
Now my problem is this: if a pop-up pops up everything runs fine but if
a pop up does not appear (there is no warning) my script stops and I get
the message
C:/IR20/ruby/lib/ruby/gems/1.8/gems/watir-1.5.3/./watir/waiter.rb:55:in
`wait_un
til': Timed out after 7.469 seconds.
(Watir::Exception::TimeOutException).
Some how I can't get the method to be ingnored if no java pop up appears
and therfore the time out kicks in. Anybody any ideas?
Cheers,
Rutger
--
Posted via
http://www.ruby-...
.
1 Answer
jt
5/20/2014 9:30:00 PM
0
"David Goldfarb" wrote in message news:n5t6pH.1s1K@kithrup.com...
J.Pascal <julie@pascal.org> wrote:
>>Actually, this would be a really great app for computers and tablets to
>>go with the word-look up functions. Then a person could hear it instead
>>of having to figure out what the little pronunciation symbols mean.
> If your computer or tablet is Internet-connected, you can go to
one of several websites with sound recordings. For example,
http://www.ho...
. (Actually, while googling their exact URL,
I turned up that they do have an app.)
Yeah, lots of dictionary apps and sites and IIRC a CD-ROM or two have a
audio output option.
eg Dictionary.com Dictionary and Thesaurus (free Android App)
http://www.amazon.com/Dictionary-com-Dictionary-and-Thesaurus/dp/B...
http://www.amazon.co.uk/Dictionary-com-Dictionary-and-Thesaurus/dp/B...
* Phonetic and audio pronunciations
* Voice search
==
I assume Google Play and Apple have it too.
But what I want and asked for here (about a year since) is an App or website
that will attempt to pronounce IPA as written --- which is rather tougher
MD> > A little while ago I asked if there was a IPA compiler
MD> > which would "read IPA aloud".
--
Mike D
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
watir::exception::Timeoutexception
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password