Closed joneshf closed 9 years ago
I haven't touched node-webkit. How does your page render without the URL? Does it even use a browser? As for that resizing line, I'm assuming you're talking about this: https://github.com/chenglou/node-huxley/blob/60e7218604af946ae222415b59783fa3d8c1b1dd/source/browser/browser.js#L72 in which case the crash is probably due to selenium acting up (what's the message?)
Yeah, it's confusing to say the least.
It runs a chromium browser in a standalone program.
Each node-webkit program has a package.json
file that details the application. One of the required fields is the main url to load: https://github.com/rogerwang/node-webkit/wiki/Manifest-format#main. When the program is first started, it's run in an arbitrary /tmp
directory. So if the main
field points to foo.html
it would throw the files in a tmp directory and the url would be something like: file:///tmp/.org.chromium.Chromium.d3qm74/foo.html
.
So, I've not found a way to choose a url in the Huxleyfile
that works for this. Things like foo.html
, ./foo.html
, and /foo.html
all seem to give the error that the page is not accessible. Perhaps there is a way to specify the url that might work in this situation?
As for the resizing, it was on an older version with gulp-huxley
, but yeah the equivalent line does cause one of selenium
/webdriver
/chromedriver
to throw, not sure which.
I'm not set up at the moment to pull the error message. I'll try to get that tomorrow or so.
I'm attempting to use node-huxley with NodeWebKit. I can get huxley to start the program and it attempts to work, but it breaks on the url and the resizing
Is there any way to make the url field optional? I'm building a node-webkit program, and there's no concept of a url that can be easily given. If it attempts to route to some other url, I actually lose the application. When it starts, it loads up the page it needs. If it tries to route, I get an exception about the url not existing. So if there's a way to turn off the url routing that'd work splendidly.
For resizing, it's somehow breaking the program. I don't know what exactly is causing it to die, but I know that if I comment out the lines that do the resizing, node-huxley will work and can record screenshots and stuff. Can it be that the window is not resized at all?
It'd be great if these could be command line arguments or something in the api such that it just works for all test ran rather than needing to modify the Huxleyfile format.
If you'd like these changes, I'll work on a PR. I wanted to ask before doing anything though.