0

我已经为简单的 java 应用程序创建了 selenium 脚本,但我无法使用 selenium 登录。我正在使用以下代码进行硒测试:

this.driver.get(this.baseUrl + "/");
this.login();
this.driver.get(this.pageUrl);
this.driver.findElement(By.linkText("Administration")).click();
this.driver.findElement(By.cssSelector("span.ui-menuitem-text")).click();

运行此应用程序后,我得到以下信息:

org.openqa.selenium.WebDriverException: com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot find function tablesorter in object [object Object]. (script in http://localhost:8080/ from (1, 21880) to (1, 22000)#1)
Build info: version: '2.28.0', revision: '18309', time: '2012-12-11 15:53:30'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.6.0_37'
Driver info: driver.version: HtmlUnitDriver

你能帮我解决这个问题吗?

4

0 回答 0