set_no_wait method no longer working?

25 visualizações
Pular para a primeira mensagem não lida

GJHmf

não lida,
24 de ago. de 2011, 11:12:3224/08/2011
para Watir General
Hi,

I've tried replying to a previous thread entitled 'text_filed
validation - onchange alert window Options' but it wouldn't permit me.
So I'm opening a new thread as I have a similar issue.

I am trying to write a test script to automate a text_field that calls
a javascript function to validate the value entered in the text_field.

<input type="text" style="width: 27px;" onkeypress="editchanged(1)"
onblur="return checkRange()" onkeydown="input_numeric(event)"
id="txtFoo" value="0" name="txtFoo" maxlength="2">

If the value entered is an invalid one, then an alert window pops up
displaying an error text on it. I want to get a handle of that popup
and verify the text on the alert window and hit on OK button.

The original thread suggested searching for details about requiring in
a 'set_no_wait' method, which I have done with no success:


1) Error:
test_00_ValidationDaily(WRSystemSetupSchedules):
NoMethodError: undefined method `eval_in_spawned_process' for
#<Watir::Frame:0x3ecfc70>
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-2.0.1/lib/watir/element.rb:
450:in `method_missing'
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-2.0.1/lib/watir/contrib/
set_no_wait.rb:8:in `set_no_wait'


Does anyone have a solution that I may try?

Thanks,


GJHmf

Environment: Ruby 1.8.7 / Watir 2.0.1

Jarmo Pertman

não lida,
25 de ago. de 2011, 09:02:3025/08/2011
para Watir General
Is it inside of a frame?

Jarmo

GJHmf

não lida,
25 de ago. de 2011, 09:38:5525/08/2011
para Watir General
Very much so, yes. The text field in question is in a frame within
another frame. I'm guessing this is part of the problem, yes?


browser.frame(:name, 'Foo').frame(:name, 'Bar').text_field(:id,
"txtExample").set_no_wait("0")


NB: I only got the error I mentioned in my original post (undefined
method `eval_in_spawned_process') if I used the set_no_wait method for
an earlier version of Watir, that was suggested in an old Watir Group
thread. If I do not require that, I can assume my script uses a
set_no_wait method that's embedded within Watir 2.0.1, which just
hangs until I populate the text field manually.

Thanks,

GJHmf
> > Environment: Ruby 1.8.7 / Watir 2.0.1- Hide quoted text -
>
> - Show quoted text -
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem