我尝试使用phantomJs对我们的无头软件进行硒测试。我能够在我们的应用程序中使用chrome或firefox运行selenium,并且能够使用phantomjs执行小型Google搜索测试。
但是在我们的软件上使用phantomJs并不能在初始登录之后工作。
我正在使用以下库:
测试场景基本上包括:
jQuery.blockUI();
在步骤(4)中,测试停止工作。截图显示了一个带有单个微调器的空白页面。
欢迎反馈,非常感谢。
** *编辑 这是控制台输出:
Page title is: My Companies Title
[ERROR - 2014-12-18T17:44:34.483Z] Session [8228e4d0-86dd-11e4-9f8a-db44bbbf7f4b] - page.onError - msg: TypeError: 'undefined' is not a function (evaluating 'b[a](d,f,this)')
[ERROR - 2014-12-18T17:44:34.483Z] Session [8228e4d0-86dd-11e4-9f8a-db44bbbf7f4b] - page.onError - stack:
(anonymous function) (http://my.url.com:8081/loginpage/generated/dd5b66ab4397f3270cca5b10ddc4521e.js:222)
(anonymous function) (http://my.url.com:8081/loginpage/generated/dd5b66ab4397f3270cca5b10ddc4521e.js:203)
(anonymous function) (http://my.url.com:8081/loginpage/generated/dd5b66ab4397f3270cca5b10ddc4521e.js:203)
(anonymous function) (http://my.url.com:8081/loginpage/generated/dd5b66ab4397f3270cca5b10ddc4521e.js:283)
(anonymous function) (http://my.url.com:8081/loginpage/generated/dd5b66ab4397f3270cca5b10ddc4521e.js:203)
(anonymous function) (http://my.url.com:8081/loginpage/generated/dd5b66ab4397f3270cca5b10ddc4521e.js:203)
(anonymous function) (http://my.url.com:8081/loginpage/generated/dd5b66ab4397f3270cca5b10ddc4521e.js:282)
(anonymous function) (http://my.url.com:8081/loginpage/generated/dd5b66ab4397f3270cca5b10ddc4521e.js:203)
(anonymous function) (http://my.url.com:8081/loginpage/generated/dd5b66ab4397f3270cca5b10ddc4521e.js:281)
[ERROR - 2014-12-18T17:44:35.036Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1418924675027
[ERROR - 2014-12-18T17:44:35.270Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1418924675253