0

I try to run a selenium test against our software headless using phantomJs. I was able to run selenium using chrome or firefox in our application and also was able to execute a small google search test using phantomjs.

But using phantomJs on our software does not work beyond the initial login.

I'm using the following libraries:

  • selenium-server-standalone-2.43.1.jar
  • selenide-2.14.jar
  • phantomjs-1.9.8

The test scenario basically consist of:

  1. opening the login page
  2. enter credentials
  3. submit form
  4. the followup page is loaded, using heavy ajax calls. Also it utilize jQuery.blockUI();

On step (4), the test stops working. The screenshot taken shows a blank white page with a single spinner.

Feedback welcome, thanks a lot in advance.

**edit* this is the console output:

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
schnickers
  • 94
  • 1
  • 9
  • Are any errors shown (such as [this](http://stackoverflow.com/questions/27466662/selenium-phantomjs-doesnt-work-on-http-webscraper-io-test-sites-e-commerce-mo#comment43370136_27466662))? Have you tried waiting? – Artjom B. Dec 18 '14 at 17:43
  • I added the console output. Also, I'm waiting up to 40 seconds. – schnickers Dec 18 '14 at 17:49
  • You have to investigate yourself what `b[a]` is supposed to be. It is really unanswerable. Note, if it is some kind of indirection for `Function.prototype.bind`. PhantomJS 1.x doesn't support that, but I haven't been able to apply a shim. – Artjom B. Dec 18 '14 at 17:53
  • not sure whether you've fixed this or not yet, but the issue is most likely with the Function.prototype.bind function, which is not included in PhantomJS. the function call mentioned in the log looks like a min-ified version of that bind call. there are shims and polyfills written for this, but i haven't been able to determine how to include them in my Selenium implementation of PhantomJS. here's a github for a shim that includes that function: https://github.com/es-shims/es5-shim. – Magenta Nova Feb 11 '15 at 17:17
  • if you have fixed it, please share. i'm still struggling to find where to insert this shim. – Magenta Nova Feb 11 '15 at 17:19
  • I haven't fixed it yet. I had to postpone further investigation of issue due to other priorities. I will update if I find the time to to investigate further. Thanks for the input thou. – schnickers Feb 18 '15 at 14:37

0 Answers0