Giter Club home page Giter Club logo

Comments (5)

jonleighton avatar jonleighton commented on August 19, 2024

Actually, this is not quite true. Currently we are raising an ObsoleteNode error when the node is obsolete, and Capybara rescues this, causing has_no_selector? to return false.

The node's obsolete status is checked before we call invoke an operation on it. However, these two page.evaluate calls are separate. Therefore I think what is happening is that the element becomes obsolete in between its obsolete check and the actual call, causing an error. So we need to do it in one call.

from poltergeist.

jonleighton avatar jonleighton commented on August 19, 2024

Fixed in 3011b27.

from poltergeist.

pellegrino avatar pellegrino commented on August 19, 2024

Sorry to reopen this, i'm experiencing some random ObsoleteNodes now and then. If i understood it correctly, if i'm using a should_not have_content, poltergeist should be throwing this error and capybara would be responsible for rescuing that and having it to return false, right?

 Failure/Error: page.should_not have_content('foobar')
 Capybara::Poltergeist::ObsoleteNode:
   Capybara::Poltergeist::ObsoleteNode
 # (eval):2:in `has_no_content?'

When i run my specs, sometimes i get this kind of error, but normally after i run a couple of times, the tests are back to normal. Would this problem be related to this issue?

from poltergeist.

jonleighton avatar jonleighton commented on August 19, 2024

I'm not sure they're related. Could you please open a new issue so it doesn't get lost? Thanks

from poltergeist.

pellegrino avatar pellegrino commented on August 19, 2024

Ok! Done! #76

Thank you!

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.