0

I am trying to implement jasmine-maven-plugin for my project.

In my project there are multiple separate web projects, I successfully integrate the above plugin in all of my web projects except one.

I have used HtmlUnit driver for all of my web projects but getting RuntimeException: Exception invoking setOnopen from WebSocket class for a particular web project, others are executing fine.

Instead of htmlunit if I use phantomjs driver then it is working seamlessly but for that I have to keep the phantomjs executable in my system PATH which is not go with the maven philosophy, I do not want to keep any separate executable in my system. Due to this I want to use htmlunit driver which is throwing the above setOnopen exception.

I did lots of google but not able to get any solution, if you have any insight on this issue please let me know. Thanks In advance.

  • do your other projects use web sockets? HtmlUnit tends to have very limited support for newer Html5 technologies. It's improved in the last couple of versions but has a long way to go. I'm a developer on the jasmine-maven-plugin and unfortunately there isn't much we can do about HtmlUnit's shortcomings. That is why we added support for phatomjs earlier this year. – Kyle Sep 17 '13 at 12:56

1 Answers1

2

If you want to avoid requiring phantomjs be installed separately you may want to take a look at these projects for some ideas:

https://github.com/qa/arquillian-phantom-binary

https://github.com/qa/arquillian-phantom-driver

And take a look at this forum discussion:

https://groups.google.com/forum/#!topic/phantomjs/yZj_ciH21pE

I've yet to have time to try this out myself but it sounds promising. Also, note that you don't need to have phantomjs on your system path. You can specify the location of the binary using the phantomjs.binary.path property. See the second example on this page which shows how to configure it using this property.

Hope that helps.

Kyle
  • 3,549
  • 1
  • 19
  • 25
  • It seems like the requirement that phantomjs is pre-installed comes up for a lot of people. So, I've decided to make a plugin to solve that problem. I've released an initial version to maven central. http://klieber.github.io/phantomjs-maven-plugin/ Hope it helps someone. – Kyle Oct 11 '13 at 19:03