September 11, 2009

Interesting Selenium |type| bug?

While writing Selenium IDE tests for SUMO (support.mozilla.com), I've noticed something weird with its input handling.

A normal recording of a login to SUMO looks like this:

open /en-US/kb/Firefox+Support+Home+Page
clickAndWait link=Log In

type login-user username
clickAndWait login-button

The problem with this is (obviously) that it omits issuing:

type login-pass password, and so the next (and successive) commands will all fail.

(Perhaps Firefox itself doesn't propagate the value submitted, to Selenium, for security -- that would make sense.)

Pretty self-explanatory, but: login-user = name of username textfield element, login-pass is the name of the password textfield element, and username/password are placeholders for the real thing.

I'm actually learning a decent amount of Selenium by trial and error, but I'd love to hear tips and tricks -- email mozwebqa@mozilla.org, comment here, or join us in #mozwebqa on irc.mozilla.org.

Posted by stephend at September 11, 2009 11:18 PM
Comments
Post a comment