Closed tylercollier closed 10 years ago
I went back to my window that was running phantomJS, which now had this appended:
Asynchronous Sessions cleanup phase starting NOW
About to delete Session 'c19a7e90-86bf-11e3-be03-e5fdd5fc5f90', because windowless...
... deleted!
Error => {
"message": "Request => {\"headers\":{\"Accept\":\"application/json; charset=utf-8\",\"Connection\":\"keep-alive\",\"Content-Length\":\"21\",\"Content-Type\":\"application/json;charset=UTF-8\",\"Host\":\"localhost:4444\"},\"httpVersion\":\"1.1\",\"method\":\"POST\",\"post\":\"{\\\"url\\\":\\\"about:blank\\\"}\",\"url\":\"/session/c19a7e90-86bf-11e3-be03-e5fdd5fc5f90/url\",\"urlParsed\":{\"anchor\":\"\",\"query\":\"\",\"file\":\"url\",\"directory\":\"/session/c19a7e90-86bf-11e3-be03-e5fdd5fc5f90/\",\"path\":\"/session/c19a7e90-86bf-11e3-be03-e5fdd5fc5f90/url\",\"relative\":\"/session/c19a7e90-86bf-11e3-be03-e5fdd5fc5f90/url\",\"port\":\"\",\"host\":\"\",\"password\":\"\",\"user\":\"\",\"userInfo\":\"\",\"authority\":\"\",\"protocol\":\"\",\"source\":\"/session/c19a7e90-86bf-11e3-be03-e5fdd5fc5f90/url\",\"queryKey\":{},\"chunks\":[\"session\",\"c19a7e90-86bf-11e3-be03-e5fdd5fc5f90\",\"url\"]}}",
"name": "Variable Resource Not Found",
"line": 81,
"sourceId": 140159546135808,
"sourceURL": ":/ghostdriver/request_handlers/router_request_handler.js",
"stack": "Variable Resource Not Found: Request => {\"headers\":{\"Accept\":\"application/json; charset=utf-8\",\"Connection\":\"keep-alive\",\"Content-Length\":\"21\",\"Content-Type\":\"application/json;charset=UTF-8\",\"Host\":\"localhost:4444\"},\"httpVersion\":\"1.1\",\"method\":\"POST\",\"post\":\"{\\\"url\\\":\\\"about:blank\\\"}\",\"url\":\"/session/c19a7e90-86bf-11e3-be03-e5fdd5fc5f90/url\",\"urlParsed\":{\"anchor\":\"\",\"query\":\"\",\"file\":\"url\",\"directory\":\"/session/c19a7e90-86bf-11e3-be03-e5fdd5fc5f90/\",\"path\":\"/session/c19a7e90-86bf-11e3-be03-e5fdd5fc5f90/url\",\"relative\":\"/session/c19a7e90-86bf-11e3-be03-e5fdd5fc5f90/url\",\"port\":\"\",\"host\":\"\",\"password\":\"\",\"user\":\"\",\"userInfo\":\"\",\"authority\":\"\",\"protocol\":\"\",\"source\":\"/session/c19a7e90-86bf-11e3-be03-e5fdd5fc5f90/url\",\"queryKey\":{},\"chunks\":[\"session\",\"c19a7e90-86bf-11e3-be03-e5fdd5fc5f90\",\"url\"]}}\n at :/ghostdriver/request_handlers/router_request_handler.js:81",
"stackArray": [
{
"sourceURL": ":/ghostdriver/request_handlers/router_request_handler.js",
"line": 81
}
]
}
I don't understand this either, but maybe the problem is with ghostdriver, rather than with the angular-seed app?
@tylercollier good catch! I updated notes about running integration specs on PhantomJS browser. Thanks! ;)
Also, can you explain the build:dev process to get protractor-conf.js into dev/test?
In the previous version I had to compile protractor spec from coffee
to js
.
Currently protractor can directly run specs written in coffeescripts
but I forgot to update the docs.
First of all, this project is fantastic. It's incredibly clean so is helping me understand how to do things properly. Thanks!
I can't figure out how to run PhantomJS for integration tests. I think the README is missing some steps, or unclear.
I have PhantomJS installed (you might want to mention to run
sudo npm install -g phantomjs
in the "Install * globally" section). I am running it successfully as instructed:But I'm not sure what exactly needs to be done when you write "run specs". Before that , you wrote "setup protractor browserName: 'phantomjs'", which I did, but that's in a coffeescript file. Somewhere that needs to be turned into JS. So I looked at the README's "How to develop specs" section, which says "run it with
grunt coffee:test && protractor dev/test/protractor-conf.js
". There is no such coffee task:If I look in
build/config/coffee.coffee
, there's only adist
task, notest
.If I try to run protractor, the file
dev/test/protractor-conf.js
doesn't exist. I'm thinking thebuild:dev
grunt task needs to be run, but it doesn't create thedev/test
folder. So for the sake of checking, I just compiled that file right there in that directory and ran:which opens up Chrome, not PhantomJS. So then I figure I need to specify the selenium port and stuff so I uncomment
protractor-conf.coffee/js
where it hasseleniumServerJar
andseleniumPort
, and run again. Again it launches Chrome, so this time I take out thechromeDriver: null
andchromeOnly: true
sections. It says unable to start selenium. So I commentseleniumServerJar
andseleniumPort
back out and addseleniumAddress: "http://localhost:4444"
.Finally, it seems to actually be using PhantomJS, but here's what I get:
What's going on? What is that telling me? Am I close to properly using PhantomJS for headless testing?
Also, can you explain the build:dev process to get protractor-conf.js into
dev/test
?