SeleniumException: ERROR: Unknown command
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.SeleniumExceptio开发者_运维技巧n: 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?
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 :-(
精彩评论