Comments (8)
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.
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.
Yeah, I reckon that should work.
from poltergeist.
Hm, nope doesn't seem to work. I'll try to gather some more data
from poltergeist.
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.
Sure: https://www.dropbox.com/s/w6ew1c3rhd0emzd/pagedump.zip
from poltergeist.
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.
Working great!
from poltergeist.
Related Issues (20)
- React event not triggered [help] HOT 2
- Capybara::Poltergeist::TimeoutError in some environments HOT 23
- ReferenceError: Can't find variable: Audio HOT 1
- React components not loading HOT 1
- Following jQuery line of code does not work in anything above v1.8.1 HOT 8
- Typo in keys method HOT 1
- Version of JS supported HOT 1
- Broken rails UJS loading when use arrow functions HOT 1
- Timeout occurs causing all following javascript tests to fail. HOT 3
- Capybara::Poltergeist::StatusFailError on 302 redirects with port numbers HOT 2
- Future of Poltergeist HOT 14
- Screenshot is not created HOT 1
- Authz request header missing HOT 5
- User agent does not persist across windows HOT 3
- Capybara::Poltergeist::TimeoutError when running CI tests HOT 7
- current_url returns empty string on about:blank HOT 3
- page.current_path always root HOT 2
- Possible make a method that check if JS Alert exist
- TypeError When dealing with link clicks via Capybara::Session HOT 2
- Capybara::Poltergeist::StatusFailError: failed to reach server (but manually I can connect perfectly) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poltergeist.