Code Monkey home page Code Monkey logo

Comments (8)

douglascamata avatar douglascamata commented on July 17, 2024

I'll start to work on this. Should we maintain backwards compatibility?

from splinter.

andrewsmedina avatar andrewsmedina commented on July 17, 2024

how this would break the compatibility?

from splinter.

douglascamata avatar douglascamata commented on July 17, 2024

I mean, remove the old methods from the browser's class.

from splinter.

andrewsmedina avatar andrewsmedina commented on July 17, 2024

Dont need remove browser methods for that. Just add a equivalent in element class.

from splinter.

fsouza avatar fsouza commented on July 17, 2024

It's a quite trick to add choose method to zope.testbrowser, since even if I query for a specific radio button by its ID, zope.testbrowser returns the group. e.g.:

<input type="radio" name="gender" value="m" id="gender-m" />
<input type="radio" name="gender" value="f" id="gender-f" />

If I query for the element with the ID gender-m, zope.testbrowser returns a ListControl representing the button group, and WebDriver returns the input itself. So, for the zope.testbrowser I'd need something like this:

element = browser.find_by_id('gender-m')
element.choose("M")

Look that it's verbose, but necessary, since zope.testbrowser doesn't know the input value. Now, with the WebDriver, I could write the following:

element = browser.find_by_id('gender-m')
element.choose()

Which makes a lot of sense. What should we do? Don't add support to choose methods on zope.testbrowser elements? Or use choose(value) for both?

from splinter.

bernardobarreto avatar bernardobarreto commented on July 17, 2024

@fsouza I agree to use choose(value), but for what I understood, since the WebDriver returns a specific radio button, this value wouldn't matter, right ? only for the zope.testbrowser

from splinter.

michelts avatar michelts commented on July 17, 2024

I think this ticket could be more extensive: not only form methods are missing in the WebDriverElement: some search methods like is_text_present and is_element_present_by_something would be useful additions.

I my opinion, this issue is also correlated with the #162 that proposes a refactor of the find_by_something methods.

How can I help?

from splinter.

jsfehler avatar jsfehler commented on July 17, 2024

Closing, since #933 has deprecated the browser level functions. browser.find() uses name internally but this is configurable.

from splinter.

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.