Giter Club home page Giter Club logo

Comments (8)

jonleighton avatar jonleighton commented on August 19, 2024

Thanks for the bug report! I am highly amused because I did not really consider this "released" yet, I only put it on Github to get the CI set up ;) (which is still a WIP)

The screenshot shows only the part of the page that is "in view" according to the browser's scroll position. I should add an option to screenshot the entire page too.

In terms of the actual problem, what I think is happening is that when you try to click the button, Poltergeist scrolls the page so that the button is at the top left of the screen, and then tries to click the top left pixel of the button. But as your screenshot shows, the top left of the button is covered up by another element layered on top.

I am not sure what the best solution is, but perhaps it would be better to only scroll the minimal distance to bring the relevant element into view. (So in that case the button would be towards the bottom of the screen and presumably not covered up.)

from poltergeist.

rb2k avatar rb2k commented on August 19, 2024

Oh, that's interesting. I wouldn't have considered that to be a problem :)
So I'd guess that if I replaced the click_button() with a javascript eval of document.forms["myform"].submit(); it should work?

(can't test atm, will be back home in an hour or so)

from poltergeist.

jonleighton avatar jonleighton commented on August 19, 2024

Yeah, I reckon that should work.

from poltergeist.

rb2k avatar rb2k commented on August 19, 2024

Hm, nope doesn't seem to work. I'll try to gather some more data

from poltergeist.

jonleighton avatar jonleighton commented on August 19, 2024

Could you able to export a static version of the page please? (I.e. using Firefox 'Save page as...' so it gets all the HTML/CSS/images)

from poltergeist.

rb2k avatar rb2k commented on August 19, 2024

Sure: https://www.dropbox.com/s/w6ew1c3rhd0emzd/pagedump.zip

from poltergeist.

jonleighton avatar jonleighton commented on August 19, 2024

Ok, I am fairly sure your problem was due to the PhantomJS window size being quite small by default.

I have changed the default window size to 1024x768 which should work fine for this. You can also now change the window size yourself (see the README).

I have also added support for taking a full-page screenshot (again, see the README).

I am closing this for now, but feel free to let me know if it still doesn't work.

from poltergeist.

rb2k avatar rb2k commented on August 19, 2024

Working great!

from poltergeist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.