Watir Question,


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?

[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
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
" puts modal_dialog.exists?"


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.



It happens when I execute

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

What might be the problem?


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

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

And I have another question as well,


now it succeeds to proceed,


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


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.