1

I'm using setExtensionJs with an user-extensions.js file that defines a doFoo prototype. This throws an exception everytime Selenium starts:

CHECKPOINT-FAIL com.thoughtworks.selenium.SeleniumException: ERROR: Unknown command "doFoo"

The setExtensionJs call is of course before of the start call.

Launching Selenium with:

-userExtensions user-extensions.js

works without problem.

Does anyone has an idea why I got the exception?

naxos
  • 11
  • 4
  • The solution from http://stuvel.eu/archive/131/extending-selenium-from-the-client-driver doesn't work either. – naxos Nov 04 '10 at 10:18

1 Answers1

0

As I noted over at the gyrmination blog:

Just a heads-up for anyone trying to use this SetExtensionJS() interface. You can’t use this to create a Selenium command like you can with user-extensions.js, because the code that registers command handlers is run before SetExtensionJS() injects your code.

Sorry :-(

Ross Patterson
  • 9,527
  • 33
  • 48