Comments (8)
I'll start to work on this. Should we maintain backwards compatibility?
from splinter.
how this would break the compatibility?
from splinter.
I mean, remove the old methods from the browser's class.
from splinter.
Dont need remove browser methods for that. Just add a equivalent in element class.
from splinter.
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.
@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.
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.
Closing, since #933 has deprecated the browser level functions. browser.find() uses name internally but this is configurable.
from splinter.
Related Issues (20)
- π From the Selenium project!
- attach_file work with flask? HOT 2
- Browser raise NoneType HOT 7
- CanΒ΄t find Iframe HOT 1
- Integration of undetected-chromedriver
- Changelog: Single file? HOT 3
- 'NoneType' object is not callable HOT 2
- We noticed regressions and inconsistencies after migrating from 0.18.1 to 0.19.0 HOT 9
- Cannot send characters directly to the browser HOT 2
- Config cannot be imported HOT 5
- Parallel script execution HOT 2
- Exception when using the latest Selenium HOT 3
- Existing profile is not loaded HOT 3
- selenium.WebDriver no longer accepts desired_capabilities as a kwarg HOT 1
- ValueError: I/O operation on closed file HOT 3
- More type annotations? HOT 1
- Constant error on startup HOT 2
- Launch the browser hidden HOT 1
- Testing and tox.ini environment improvements
- Splinter tests not failing when element not found on the page and wait_time set to 1 second 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 splinter.