garris / garris/BackstopJS

Casper JS click fails screencapture

Open
#285 15 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
621
PR merge metrics
No merged PRs in 30d

Description

Hello,

My casper script is a simple click and it causes the screen capture to mess up.

Here is my JSON file (you can test it yourself)

```
{
"viewports": [
{
"name": "tablet_h",
"width": 1024,
"height": 768
}
],
"scenarios": [
{
"label": "Tous les boutons",
"url": "http://s.codepen.io/stephendesjardins/debug/BLLPmK",
"referenceUrl": "http://s.codepen.io/stephendesjardins/debug/BLLPmK",
"selectors": [
"#boutons"
],
"misMatchThreshold" : 1
},
{
"label": "Bouton divisé",
"url": "http://s.codepen.io/stephendesjardins/debug/BLLPmK",
"referenceUrl": "http://s.codepen.io/stephendesjardins/debug/BLLPmK",
"selectors": [
".dropdown-divise"
],
"misMatchThreshold" : 1,
"onReadyScript": "button-interaction.js"
}
],
"paths": {
"bitmaps_reference": "../../backstop_data/bitmaps_reference",
"bitmaps_test": "../../backstop_data/bitmaps_test",
"compare_data": "../../backstop_data/bitmaps_test/compare.json",
"casper_scripts": "../../backstop_data/casper_scripts"
},
"engine": "phantomjs",
"report": ["browser", "CLI"],
"debug": false,
"port": 3001
}
```

Casper script :

```
module.exports = function(casper, scenario, vp) {
casper.click('.dropdown-divise .dropdown-toggle');
casper.wait(250);
}
```

Codepen I am using for my test in the json file :
http://codepen.io/stephendesjardins/pen/BLLPmK?editors=1000
http://s.codepen.io/stephendesjardins/debug/BLLPmK

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.