Tag Archives: Firefox

How to show all cookies for a page

It’s not always that you can test a website from the comfort of Firefox + Firebug + FireCookie. When you have to use another browser where checking cookies isn’t so much fun (er… that’s all of them but firefox), you … Continue reading

Posted in Making Life Easier | Tagged , , , , , | Leave a comment

Lessons from a watir success story

There aren’t enough UI test automation success stories documented on the net, so here’s my contribution. This post is about  how we started with zero automated UI testing capability, and how a couple of months later we had the capability … Continue reading

Posted in Automated Testing, Ruby, Test Management, Test::Unit, Tools, WATIR, agile | Tagged , , , , , , , , , | 10 Comments

Watir’s @browser.url returning the previous page’s url

I’ve come across a page which, when I navigate to it and ask it for it’s url (using @browser.url) gives me the previous page’s url. Very frustrating. To get around this, you can use direct DOM manipulation. Here’s a call … Continue reading

Posted in Automated Testing, Example Code, Ruby, Tools, WATIR | Tagged , , , , , , , | 2 Comments

Kill process by name using Ruby on Windows

Though it is possible in ruby to kill a process by its ID in ruby, it isn’t possible to kill processes by name, I guess because it would work differently across operating systems. This is a pain when using watir/firewatir, … Continue reading

Posted in Example Code, Ruby, Tools, WATIR | Tagged , , , , , , | Leave a comment

Exception class/object expected (TypeError) on starting FireWatir

If you get the following… /Library/Ruby/Gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:1078:in `raise’: exception class/object expected (TypeError) from /Library/Ruby/Gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:1078:in `js_eval’ from /Library/Ruby/Gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:195:in `get_window_number’ from /Library/Ruby/Gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:162:in `initialize’ from /Library/Ruby/Gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:177:in `new’ from /Library/Ruby/Gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:177:in `start’ …the problem is that firefox is already running, probably with a dialog box open. … Continue reading

Posted in Automated Testing, Ruby, WATIR | Tagged , , , , , | Leave a comment

Finding a form by xpath in Firewatir causes ‘Stack Level Too Deep’

If in a firewatir script you look for a form using xpath, you’ll get the following output: SystemStackError: stack level too deep from /Library/Ruby/Gems/1.8/gems/firewatir-1.6.2/lib/firewatir/htmlelements.rb:72:in `locate’ from /Library/Ruby/Gems/1.8/gems/firewatir-1.6.2/lib/firewatir/MozillaBaseElement.rb:1012:in `exists?’ from /Library/Ruby/Gems/1.8/gems/firewatir-1.6.2/lib/firewatir/MozillaBaseElement.rb:965:in `assert_exists’ from /Library/Ruby/Gems/1.8/gems/firewatir-1.6.2/lib/firewatir/MozillaBaseElement.rb:1403:in `method_missing’ from /Library/Ruby/Gems/1.8/gems/firewatir-1.6.2/lib/firewatir/htmlelements.rb:75:in `locate’ from /Library/Ruby/Gems/1.8/gems/firewatir-1.6.2/lib/firewatir/MozillaBaseElement.rb:1012:in `exists?’ … Continue reading

Posted in Automated Testing, WATIR | Tagged , , , | Leave a comment

How to quit Firefox using FireWatir on a Mac

There seems to be a bug in the way that FireWatir on the mac quits firefox… it doesn’t! When you try, you end up with a dialog box saying: Close Firefox A copy of Firefox is already open. Only one … Continue reading

Posted in Automated Testing, Example Code, Ruby, Tools, WATIR | Tagged , , , , , , | Leave a comment