Key Events
It turns out selenium.type(...) doesn't actually simulate a user typing into an input box. Go figure. So we typed in the text and triggered everykey stroke seperately - selenium.keyDown(...); selenium.keyPress(...); selenium.keyUp(...);. It worked!! in Firefox... In other browsers, it would now would print every character twice.
Timings
..Due to our non-selectable items (section labels etc.), we wanted to test that some elements attributes do not change. We fire a mouse event on the element, and then use an xpath locator to check that the element's attribute did not change ... it needed a slight pause between the event fire and test ... This was a very common fix for a lot of the things that would break - "Add/increase the pause".
Mouse Positioning Issues
To make things a little nicer for our users we decided to put in an autoscroll feature.... After putting in/increasing numerous pauses, I still couldn't get them to pass. Why would scrolling the screen cause the tests to fail? We fire events on selected elements - not co-ordinates. The build kept on breaking......I saw the mouse positioned directly in the middle of the screen, when the browser window scrolled, the mouse was positioned over one of the non-selectable items ... How to fix? We installed xwarppointer, to enable us to move the mouse pointer through bash, and tucked it away in a little corner.
Overall Menere learned a number of lessons. The most important of which was that the Selenium client is not a user.