Comments (11)
Cool. Looks like there are some capybara specs for this: https://github.com/jnicklas/capybara/blob/master/lib/capybara/spec/driver.rb#L191. I don't know if this will be possible without patches to PhantomJS, but we can try. (And submit a patch to PhantomJS if not.)
from poltergeist.
Hi @jonleighton did this ever see the light of day?
I've been hunting through the poltergeist source and I was hoping that I could manually switch focus between my main window and a popup by using Agent.pushWindow() and Agent.popWindow(), but so far I'm not having much joy.
(Thanks!)
from poltergeist.
I couldn't figure this out personally
from poltergeist.
I haven't had a chance to look at it yet.
from poltergeist.
No worries, thanks Jon.
I don't suppose you could point me to the right place to call methods
on the browser or agent directly? (From Ruby) I haven't been able to
work out how the ruby driver calls down to the JavaScript classes
(which then drive PhantomJS). Then I might be able to find a
workaround or even patch it myself.
Thanks either way
from poltergeist.
@iainbeeston json messages are passed via a web socket, and result in method invocations in browser.coffee. sorry, I don't have time to explain further than that :/ tbh I don't think working out this ticket is an entry level task if you are unfamiliar with phantomjs / poltergeist, but don't let me put you off if you have the time.
from poltergeist.
I see. In that case I'll take a look but I'll bear your warning in
mind when I do. Cheers Jon
from poltergeist.
+1
FYI, phantomjs seems to be actively working on this:
http://code.google.com/p/phantomjs/issues/detail?id=151
from poltergeist.
They merged fix to master ariya/phantomjs#293
from poltergeist.
@jonleighton just saw this! Thanks a lot! 👍
Are you able to please provide any tips on how to convert my current specs over to use this?
from poltergeist.
@parndt page.within_window
works, but you need to know the name of the window. this is not currently exposed - if you'd like that to be added please create a new issue to track it. shouldn't be hard to add.
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.