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 specific suites.
Read the rest of this entry »
July 17th, 2010 | Posted in Selenium, Selenium Simplified | 1 Comment
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 java class we can run the highlight command prior to executing other Selenium commands, without amending our existing tests. And answer the question, "what if Selenium's Highlight Command was always on?"
Read the rest of this entry »
June 30th, 2010 | Posted in Selenium, Selenium Simplified | No Comments
When I learned about Selenium’s ability to capture network traffic I was really excited. This opened up a whole new world of testing possibilities. I could capture the Ajax requests made to the server and check them for validity. When I visit pages I can check the web analytics messages sent back and check their correctness. So this post explains a little about how to use CaptureNetworkTraffic.
Read the rest of this entry »
May 26th, 2010 | Posted in Uncategorized | 3 Comments
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 tool, but you still want to cover the basics of the page? This code snippet shows one way to do it.
Read the rest of this entry »
April 2nd, 2010 | Posted in Selenium, Selenium Simplified | 1 Comment
James Whittaker has talked and blogged about Testing HUDs. In this post I will show you how to build a simple HUD for testing web applications. And In true Blue Peter stylee you can find all the things you need, for free, a few clicks away on the internet (Samurize, Fiddler).
A HUD (Heads Up Display) allows us to ‘see at a glance’ important real time information that we might not otherwise have access to. And allows us to increase our perception of ‘reality’. We will build one that gives us a little more insight into web sites we test.
Read the rest of this entry »
March 19th, 2010 | Posted in Tools | 5 Comments
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 setup and tests pretty simple, I wanted a much lower maintenance way of implementing the getCSSCount functionality.
Read the rest of this entry »
March 13th, 2010 | Posted in Selenium | 1 Comment
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.
Read the rest of this entry »
March 11th, 2010 | Posted in Selenium, Tools | No Comments
I use XPather to help me write my automated tests, and other people seem to like XPath Checker. But today I needed something a little harder hitting and something which didn’t sit in the browser to help me write some batch processing xml tests. I found SketchPath, a fantastic free .net written tool.
Read the rest of this entry »
March 8th, 2010 | Posted in Tools | No Comments
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 you off to their site. But they don’t, and I’m only writing this because I think they have a great tool and want to draw your attention to it.
Read the rest of this entry »
March 4th, 2010 | Posted in Selenium | 1 Comment
You know the annoying situation when you walk down the street minding your own business when suddenly someone stops you and says “Hey You. Are you a tester?” Well, in this informative public service broadcast I present the verbal and non-verbal techniques you need to know, to cope.
Read the rest of this entry »
March 3rd, 2010 | Posted in Cartoons | 1 Comment