question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Casper JS click fails screencapture

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
garriscommented, Jul 15, 2017

@stephenbe thanks for your kind words and positive energy! Keep up with the bitemogi!

1reaction
garriscommented, Jul 15, 2017

Hi – thanks for letting me know! Very glad it’s working for you. I am not sure there was any fix that I made which would have fixed this. I have not been great about documenting everything always apologies for that!

There is a lot of work happening at the moment however. I am integrating chrome-headless into backstop. And also enabling parallel screen capture. These two changes are making the whole experience much faster and way more stable!

Read more comments on GitHub >

github_iconTop Results From Across the Web

CasperJS screenshot gives a blank screen - Stack Overflow
Your log revealed "Error: TypeError: 'undefined' is not an object (evaluating 'Object.assign.apply')" which might be responsible for a blank ...
Read more >
[Solved]-CasperJS click fails to show modal window-phantom.js
Coding example for the question CasperJS click fails to show modal window-phantom.js.
Read more >
CasperJS – Automated Testing of Web Applications
CasperJS functionality · Defining and ordering browsing navigation steps · Filling and submitting forms · Clicking and following links · Capturing screenshots of...
Read more >
Events & filters — CasperJS 1.1.0-DEV documentation
Emitted when a screenshot image has been captured. click ¶. Arguments: selector. Emitted when the Casper.click() ...
Read more >
CasperJs Documentation - Read the Docs
--log-level=[debug|info|warning|error] to set the logging level. • --engine=[phantomjs|slimerjs] to select the browser engine you want to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found