cognitom / wdio-phantomjs-service

WebdriverIO service to start & stop PhantomJS
MIT License
8 stars 1 forks source link

Unable to get this running #6

Open GGuru opened 8 years ago

GGuru commented 8 years ago

Hello @cognitom,

I am trying to switch my services in wdio config from selenium-standalone to phantomjs. I did changes as mentioned but my tests are not running. not even browser.url() works

Test run ends immediately with the error below. log file output is pasted after this.

0 passing (1.10s)
1 failing

1) Form header title tests "before all" hook:
Form page main region is visible: expected {} to equal true
running
AssertionError: Form page main region is visible: expected {} to equal true
    at /home/workspace/projects/functional-tests/Sanity.spec.js:22:108

1 [INFO  - 2016-10-21T06:47:48.205Z] GhostDriver - Main - running on port 4444
  2 [ERROR - 2016-10-21T06:48:36.925Z] GhostDriver - main.fail - {"line":85,"sourceURL":"phantomjs://code/main.js","stack":"global code@phantomjs://code/main.js:85:56"}
  3 [ERROR - 2016-10-21T06:50:55.530Z] GhostDriver - main.fail - {"line":85,"sourceURL":"phantomjs://code/main.js","stack":"global code@phantomjs://code/main.js:85:56"}
  4 [ERROR - 2016-10-21T06:52:18.178Z] GhostDriver - main.fail - {"line":85,"sourceURL":"phantomjs://code/main.js","stack":"global code@phantomjs://code/main.js:85:56"}
  5 [ERROR - 2016-10-21T06:53:18.090Z] GhostDriver - main.fail - {"line":85,"sourceURL":"phantomjs://code/main.js","stack":"global code@phantomjs://code/main.js:85:56"}
  6 [ERROR - 2016-10-21T06:54:18.857Z] GhostDriver - main.fail - {"line":85,"sourceURL":"phantomjs://code/main.js","stack":"global code@phantomjs://code/main.js:85:56"}
  7 [ERROR - 2016-10-21T06:55:33.440Z] GhostDriver - main.fail - {"line":85,"sourceURL":"phantomjs://code/main.js","stack":"global code@phantomjs://code/main.js:85:56"}
  8 [ERROR - 2016-10-21T06:56:39.586Z] GhostDriver - main.fail - {"line":85,"sourceURL":"phantomjs://code/main.js","stack":"global code@phantomjs://code/main.js:85:56"}
cognitom commented 8 years ago

Hello @GGuru,

Have you checked this repo already? It could be a good starting point, I think. https://github.com/cognitom/webdriverio-examples/tree/master/wdio-wo-local-selenium

GGuru commented 8 years ago

I didn't look into that as it requires a cloud service testing account. Is it required to use wdio-phantomjs-service?

cognitom commented 8 years ago

Nope, you don't have to use cloud services. It's optional. Now I've added a simpler example. Check it out, too 😉 https://github.com/cognitom/webdriverio-examples/tree/master/wdio-phantomjs-only

GGuru commented 8 years ago

Thanks @cognitom - It works! I I am able to use the phantomjs successfully. I was using wdio-selenium-standalone for phantom too which spins up selenium server every time. This is much improvement for my test suite.