PhamtomJS logs?


#1

Hi everyone,
i am trying to play with cucumber for velocity.
My tests are running fine with Firefox and Chrome, however they fails with Phantomjs.
Perhaps there is something in the console that could help me to see the cause of this, however i don’t know how to enable logging for phantomjs.
Anyone could help me or provide me with pointers how do find the possible cause of failing tests in phantomjs ?

Thank you in advance.


#2

Which method did you use for installing Phantomjs?


#3

I use the Phantomjs provided by velocity.


#4

I reply to myself :
To get the browser logs, you have to write :

this.client.log("browser", function(err, res){
  console.log(res);
  callback();
});

There may be a promise “sugar” but i didn’t try.


#5

The problem is that PhantomJS is not a real browser and sometimes lacks support for things.

An easy thing to do is to start phantom manually and run it against your app. See this thread for some info:
https://github.com/xolvio/meteor-cucumber/issues/133

The other thing is to enable VELOCITY_DEBUG=1 and tail the cucumber log. That should give you some more details. I don’t recall if it’s full debug for phantom or not.


#6

and what you did is cool :slight_smile: