Questions tagged [phantomcss]
23 questions
4
votes
2 answers
While Loop to Setup CasperJS "then()" Steps
I'm trying to test the visual state of a number of buttons -- hover, click, focus -- and was looking for a way to not copy basically the same casper.then() command over and over. I thought I should be able to do this in a simple loop.
I made a small…

nathanziarek
- 619
- 1
- 6
- 16
4
votes
1 answer
Splitting test files in CasperJS -- Struggling with logic of it
As many other here at Stack are struggling with, I'm trying to split my CasperJS tests across multiple files. I've spent three days reading the docs and crawling through the answers here and can't seem to find anything that helps.
I have three…

nathanziarek
- 619
- 1
- 6
- 16
3
votes
0 answers
Cant start casper when using along grunt-phantomcss
Trying to add my visual regressions tests to grunt.I followed the tutorial avaliable here. But looks there's something going wrong.
Here's my gruntfile:
phantomcss: {
desktop: {
options: {
screenshots:…

andrepm
- 867
- 4
- 13
- 31
2
votes
0 answers
How to use PhantomCSS with Protractor(Selenium) test cases?
I have using Protractor(Selenium) Test cases from past few months , We want to integrate UI Regression using PhantomCSS( with Baseline concept) also in our Protractor (selenium)Test Cases.
Note:
(we are able to use Phantomcss but as side project…

Pramod Dutta
- 111
- 2
- 12
2
votes
0 answers
CSS visual regression - do I need to store screenshots in git repository?
There is a technique to check if something visually not broken in HTML and CSS markup - visual regression testing.
We do following steps:
Check everything is ok.
Create a test "reference" (creating *.png files).
Change something.
Run test and check…

Dmitry Yaremenko
- 2,542
- 20
- 31
2
votes
4 answers
Testing phantomCSS won't find ResembleJs container
I'm trying to add visual comparison tests to my layouts but it seems I've not configured my testing environment correctly.
I'm using:
CasperJS
PhantomJS
PhantomCSS
ResembleJS
This is my test JS file:
var url, screenshotRoot, modules, phantomCSS,…

vitto
- 19,094
- 31
- 91
- 130
1
vote
0 answers
How to delete a directory using CasperJS
I'm trying to delete a dir recursively which contains files. However, I'm getting error message although the directory exists:
uncaughtError: Unable to remove directory './screenshots/build'
fs.removeDirectory('./screenshots/build');

Rahul Dagli
- 4,301
- 15
- 47
- 85
1
vote
1 answer
How to capture screenshot of a component inside an iframe using phantomcss
I am testing a web application which has an iframe.
I am using phantomcss to take screenshot of a component inside an iframe using casper.withFrame, but the image captured is distorted.
My main page is like this -
…

DRoy
- 13
- 2
1
vote
1 answer
PhantomCSS/CasperJS - Greying out advertisement images
Hey guys just testing our pages out using the grunt-phantomcss plugin (it's essentially a wrapper for PhantomJS & CasperJS).
We have some stuff on our sites that comes in dynamically (random profile images for users and random advertisements) sooo…

Dave Lunny
- 750
- 8
- 21
1
vote
3 answers
PhantomCSS undefined object in test.success
I'm writing a test script with PhantomCSS but I'm running into an error. I've already run my script one time and I created the baseline screenshots. Now, when I try to run through it again, it creates the .diff.png images, but then throws the…

Jordan Plahn
- 375
- 4
- 12
1
vote
1 answer
Click every link on a web page with CasperJS
I've been using PhantomCSS to write visual regression tests with screenshots for a website. I want to simulate a click with CasperJS on every a element on a page. I am able to retrieve every href and use open to visit each link, but I want to…

Fernando Briano
- 7,699
- 13
- 58
- 75
0
votes
0 answers
String.prototype.startsWith: "undefined is not a constructor", PhantomCss Is the phantomjs not working on an app that is using angular ui-view
The ui-view elements are not appear when I use as below:
casper.start('https://carepilot-web-staging.herokuapp.com/login');
casper.then( function () {
require('utils').dump(this.getElementInfo('.main-page'));
…

jackchen
- 71
- 8
0
votes
0 answers
PhantomJS could not find this element "driver.findElement(By.name("q")) selenium web driver Java
I have written code using selenium web driver java to search for school and to get the first url from the search . my code is working fine without PhantomJS. But as i want to use headless browser, trying the below code to make changes.
WebElement…

Bhavana
- 68
- 12
0
votes
1 answer
Unable to capture screenshot greater than screen height
I'm looking to capture a 5000px long screenshot. But after capturing, it only captures content that is equal to the height of my desktop screen height which is 1080px and rest is blank.
casper.viewport(1024, 5000);

Rahul Dagli
- 4,301
- 15
- 47
- 85
0
votes
2 answers
PhantomCSS screenshot not working correctly inside for loop
I would like to capture a screenshot on every page. In order to navigate to a different page there is a function moveNext(). When I check in the console I am able to see that its navigating to all the pages in sequence. However, its not taking…

Rahul Dagli
- 4,301
- 15
- 47
- 85