Giter VIP home page Giter VIP logo

Comments (5)

jlipps avatar jlipps commented on September 15, 2024

Sounds good to me, admc?

from wd.

admc avatar admc commented on September 15, 2024

Yeah all of these sound reasonable, any idea of ruby and python do this? I would overall like to have similar behavior between the projects.

from wd.

sebv avatar sebv commented on September 15, 2024

I googled around the ruby behavior, and It probably throws a 'Not Found' exception. That would make sense since sending exception around has a big impact on performances (even more when using Sauce Labs), the whole page being included, so best not to encourage users to do it.

So best would probably to keep the element methods as if, and add hasElement and elementOrNull methods which are implemented using the elements (with s) method which just return an empty if the element do not exists.

Concerning the parameter default, this is part of JsonWire spec. I didn't noticed, but those kind of issues where fixed 2 days ago when I reformatted the code. This was due to the callback being identified as the 4th argument (in moveTo) before, and now the builder automatically looks in the last argument and finds it, no matter how many arguments. So I just wrote extra unit tests for these case and that's it.

from wd.

admc avatar admc commented on September 15, 2024

Fantastic, I agree that sending entire exceptions and page content across the wire is a terrible idea. So lets keep things the way they are and go with adding a couple methods (hasElement and elementOrNull) to take care of the needed functionality.

Thanks for starting the convo!

from wd.

sebv avatar sebv commented on September 15, 2024

Ok done, added see element/elements section in the doc.

Also made it generic to add/test this kind of element function in the future.

Seb.

from wd.

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.