Comments (7)
It should work on Windows. I built it on Windows.. Just had a quick gander, no repro for me with the demo :(
Can't say for sure, you seem to be using a npm installed CasperJS 'C:/Users/Kriss/AppData/Roaming/npm/node_modules/casperjs/modules/casper.js:1553' which is reasonable - but I wonder if the version you're using is different in some way, perhaps there has been a breaking change in CasperJS recently.
Could you try using (Windows only) the casperjs.bat file?
casperjs.bat test demo/testsuite.js
from phantomcss.
I get the same error when I invoke the demo test suite with casperjs.bat. Is there an alternate way to install CasperJS that you think I should try?
from phantomcss.
Not sure it's the CasperJS install then. I can't think of any other possible solutions, maybe some weird localhost port conflict? Try running the demo tests without localhost running. Pulling at straws tbh. Sorry I can't be more helpful.
from phantomcss.
I'm running into this issue. It's extremely strange and exceedingly hard to reproduce. Probably not a PhantomCSS bug, but I really have no idea at this point. I'm posting less to ask for a solution and more to document my descent into madness.
Using:
- casperjs 1.1.0-beta3 (via npm)
- phantomjs 1.9.17 (via dependency of casperjs)
- phantomcss 0.10.1 (via npm)
What's going on is that for some reason, Casper.prototype.fill
seems to be getting clobbered by some other value, which can change depending on completely unrelated alterations to other parts of my test suite. Because of this, I'm starting to suspect some sort of memory allocation bug.
I've been looking for exactly where this happens, and I tracked it to this call within casper.captureSelector
. Note the console.log
s:
Casper.prototype.getElementBounds = function getElementBounds(selector) {
"use strict";
this.checkStarted();
if (!this.exists(selector)) {
throw new CasperError("No element matching selector found: " + selector);
}
var clipRect = this.callUtils("getElementBounds", selector);
console.log('getelementbounds1', Casper.prototype.fill);
if (!utils.isClipRect(clipRect)) {
throw new CasperError('Could not fetch boundaries for element matching selector: ' + selector);
}
console.log('getelementbounds2', Casper.prototype.fill);
return clipRect;
};
The output is as follows:
getelementbounds1 function GET(formSelector, vals, submit) {
"use strict";
return this.fillForm(formSelector, vals, {
submit: submit,
selectorType: 'names'
});
}
getelementbounds2 984
A couple interesting things here. First is that at some point earlier, the function name has been replaced with what appears to be an HTTP verb. Second is that after utils.isClipRect
is called, the value on Casper.prototype
is replaced entirely with 984
, which is the width of the element.
All of this leads to my preliminary hypothesis that for some reason, the section of memory in which Casper.prototype
resides has somehow been double-allocated.
That's all I've got for now.
from phantomcss.
Note that I tried the same repo on Windows and OSX, and only ran into this issue on the Windows machine.
from phantomcss.
I have a minimal reproducing test case: https://github.com/smrq/phantomcss-wtf
from phantomcss.
I've run into this issue and after some research found a quickfix: https://groups.google.com/forum/#!topic/casperjs/i39TtMnwgJs
Seems like casperjs issue with casper.fill on windows.
I've created a pull-request with a fix: #127
from phantomcss.
Related Issues (20)
- can phantomcss able to club the original image , diff image and failure image in one single image? HOT 4
- Screenshot fails on container of floated elements HOT 1
- When page has asynchronously content following error occures. HOT 1
- Unable to capture screenshot greater than screen height HOT 1
- Page is not loading properly some components are missing while taking the screenshots HOT 4
- Says test failed, but failure folder is not created. HOT 1
- xunit testcase name inconsistent and not inherited from casperjs HOT 4
- TypeError: undefined is not an object (evaluating 'fileData.data') HOT 2
- PhantomJS fails with TypeError HOT 1
- Add more usage examples HOT 1
- Running PhantonCSS test after javascipt run on the page. HOT 1
- screenshot passes on if selector is missing HOT 2
- PhantomCSS is moving the HTML elements around HOT 1
- duplicate baseline image HOT 1
- Is the phantomjs not working on an app that is using angular ui-view HOT 6
- [email protected] requires a peer of canvas@^1.6.5 but none was installed HOT 3
- Do I need python for this? HOT 1
- Bug scroll bottom on fail screenshot HOT 3
- Support for the https pages HOT 1
- Create screenshots without test number at the end HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phantomcss.