Archive for the 'Selenium' Category

Using JUnit Nested Suites with Selenium RC to simulate TestNG suite and grouping annotations

When I use TestNG for my Selenium tests, I really like the BeforeSuite and AfterSuite annotations because then I can share a Selenium session amongst the tests. With nested JUnit suites I can achieve a similar effect, and I can also go some way to grouping my tests to make it easier to create browser […]

What if Selenium’s Highlight Command was always on?

A reader asked for recommendations on how to use Selenium’s "Highlight" command. Now I personally don’t use the highlight function. Never really have. When I debug my tests, I step through the script in Eclipse (I write all my tests in Selenium-RC using Java).
But, by using reflection to automatically generate code for a […]

Selenium Example – How to Amend the JavaScript of the Web Application Under Test

Why would you want to change the JavaScript of a web application you have to test? Well, if you want to test that events get triggered correctly and the basic structure of the page rather than the actual functionality implemented by the JavaScript. Perhaps the JavaScript does something that you can’t handle with the automation […]

A simple getCSSCount for use with Selenium-RC

We know that XPath runs slowly in IE, but XPath has the getXPathCount method. And CSS runs quickly but Selenium doesn’t have a corresponding getCSSCount method.
I looked around for a simple way of getting count from a CSS selector.
I found this blog post by Aditya Ivaturi, but since I like to keep my Selenium […]

Use Firefinder to help you construct Selenium CSS selectors

Looking through the archive of blog posts, I can see that I mentioned various tools for Xpath construction, but none for CSS selectors in Selenium. Let’s change that now… Firefinder helps you test your css selectors and XPath statements before committing them to Selenium code.

Selenium as a performance and load test tool with BrowserMob

I recently had the good fortune at work to have tested an Amazon cloud hosted application. And this led to the test team having to investigate alternative performance test tools. We settled on BrowserMob and we have loved it.
I wish BrowserMob had an affiliate program, then I might get some cash if I send […]

How I learned to love Selenium’s fireEvent

“I clicked on that, why didn’t the click work!”
I recently faced the challenge of using Selenium to automate a web application that stubbornly resisted my attempts to automate it - until I found the fireEvent!

Get rid of those pesky IE dialogs with AutoIt

Over the years I have used and reused a variant of a single AutoIt script. The script basically polls windows for a dialog that matches a certain pattern and then performs some action.
I most recently used this to get rid of the IE dialog that pops up using Selenium with IEHTA asking if you want […]

A little abstraction when testing software with Selenium-RC and Java

The testing tool Selenium goes from strength to strength. As evidenced at the recent Selenium Users Meeting, the future plans for Selenium look really interesting and Google seem to want to continue to invest heavily in Selenium which can only mean good things for the rest of us.
Testers have learned to use abstraction […]