Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scenario with hash fragment in URL does not create a screenshot #172

Open
paweltin opened this issue Mar 10, 2016 · 4 comments
Open

Scenario with hash fragment in URL does not create a screenshot #172

paweltin opened this issue Mar 10, 2016 · 4 comments
Labels

Comments

@paweltin
Copy link

This is the scenario:

"scenarios": [
   ...
    {
      "label": "Label",
      "url": "https://some.url#somehash",
      "selectors": [
        "body"
      ],
      "delay": "500",
      "misMatchThreshold" : 0.1
    },
   ...
]

I'm using SlimerJS as an engine. Browser renders the page correctly (scrolls to correct section) but there is no corresponding screenshot in bitmaps_reference after running the test

@paweltin paweltin changed the title Scenario with has in URL does not create a screenshot Scenario with hash in URL does not create a screenshot Mar 10, 2016
@garris
Copy link
Owner

garris commented Mar 15, 2016

@paweltin I just tried this myself and got some unexpected results. It may be related to this... https://github.com/n1k0/casperjs/issues/468

@garris garris changed the title Scenario with hash in URL does not create a screenshot Scenario with hash fragment in URL does not create a screenshot Mar 15, 2016
@garris garris added the bug label Mar 15, 2016
@opub
Copy link

opub commented Aug 3, 2016

I believe I am running into this using PhantomJS. I only get empty (3.58 KB PNG) screenshots when loading URLs with a hash fragment. Are there any potential workarounds?

I'm not sure if it is related but the other resources from the page don't appear to load either when using the hash fragment. That might be something I'm doing wrong though. I've just started looking into this.

@garris
Copy link
Owner

garris commented Aug 3, 2016

@opub what version of backstopjs are you using? (If you are not using the latest -- then please update.)

I also experienced this bug with Phantom during a test -- I don't know if they have fixed it in more recent versions. If not, there is a plausible-looking workaround here... https://github.com/casperjs/casperjs/issues/468 (Tho I haven't tried it.)

Maybe the best way to workaround is to use the BackstopJS Slimer option...
https://github.com/garris/BackstopJS#changing-the-rendering-engine-version-060

Hope this helps. Please let me know how you end up resolving the issue. Cheers.

@opub
Copy link

opub commented Aug 10, 2016

My apologies. While searching for solutions to this I hadn't realized that I had jumped from CasperJS GitHub issues to BackstopJS. I'm not using BackstopJS, just the vanilla CasperJS and PhantomJS. I think my problem is ariya/phantomjs#13652.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants