Watir Question,

hi

When I am automating the webpage using Watir, automation suddently stops
and it throws the error as given below, could you please suggest me how
would I resolve this?


C:/Ruby187/lib/ruby/gems/1.8/gems/rautomation-0.7.2/lib/rautomation/adapter/win_32/functions.rb:319:
[BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32]

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application’s support team for more information.


Please show the full trace, the line of your code which threw the error,
and the relevant code around it.

hi ,

It appears sometimes and it is not appearing sometime, I don’t know
which place it arrives also. Last time it happened while I try to
execute
" puts modal_dialog.exists?"

RAJ

I think I had to modify alert.rb in order to get watir-webdriver to wait
for alerts. You’ll probably find that the same applies here, your
version of watir most likely doesn’t get as far as “exists?” because it
raises an exception when looking for the modal_dialog. You’ll either
have to handle the error there or change the way you check whether the
dialog is present.

NO, This error is not happening all the time, some occasion it succeeds
as well, some occasion it fails with the above error.

RAJ

hi

It happens when I execute

" puts $browser.modal_dialog().exists?"

What might be the problem?

RAJ

Yes, it’s probably timing out, but only when there’s a slight delay in
the dialog appearing. The only way to do this with the tools you have is
to handle the waiting time with some extra code, either in watir’s
libraries or by using your own error-handling code with a timeout and
retry.

hi Thank you, how to do that in WATIR Libraries?

And I have another question as well,

$browser.select_list(:id,‘something’).set(‘Raja’)

now it succeeds to proceed,

$browser.select_list(:id,‘something’).set(‘RAJA’)

Since all letters are capital, it fails, Is there any way Can i negate
this caps lock problem in select_list?

RAJ

hi thank you.

If you look at the full error trace you should be able to see everywhere
the error passed through, allowing you to look at each file and
determine the best place to add error-handling / waiting code.

You could look at the “value” in the select list and use “set_value”, or
you could use a case-insensitive regular expression to scan through all
the options in the select list and return the one which matches.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs