Giter Club home page Giter Club logo

Comments (11)

jonleighton avatar jonleighton commented on August 19, 2024

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.

iainbeeston avatar iainbeeston commented on August 19, 2024

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.

parndt avatar parndt commented on August 19, 2024

I couldn't figure this out personally

from poltergeist.

jonleighton avatar jonleighton commented on August 19, 2024

I haven't had a chance to look at it yet.

from poltergeist.

iainbeeston avatar iainbeeston commented on August 19, 2024

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.

jonleighton avatar jonleighton commented on August 19, 2024

@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.

iainbeeston avatar iainbeeston commented on August 19, 2024

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.

canavese avatar canavese commented on August 19, 2024

+1

FYI, phantomjs seems to be actively working on this:
http://code.google.com/p/phantomjs/issues/detail?id=151

from poltergeist.

madmax avatar madmax commented on August 19, 2024

They merged fix to master ariya/phantomjs#293

from poltergeist.

parndt avatar parndt commented on August 19, 2024

@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.

jonleighton avatar jonleighton commented on August 19, 2024

@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)

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.