2010-11-04 66 views
1

我使用setExtensionJs與定義doFoo原型的user-extensions.js文件。 這將引發異常每次硒開始:SeleniumException:錯誤:未知的命令

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

的setExtensionJs電話當然是開始通話之前。

與發射硒:

-userExtensions user-extensions.js 

作品沒有問題。

有沒有人有一個想法,爲什麼我得到了異常?

+0

從該溶液http://stuvel.eu/archive/131/extending-selenium-from-the-client-驅動程序也不起作用。 – naxos 2010-11-04 10:18:39

回答

0

正如我指出過在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.

抱歉:-(