splinter icon indicating copy to clipboard operation
splinter copied to clipboard

Select method for WebDriverElement

Open michelts opened this issue 14 years ago • 4 comments

Hi, I missed the possibility to select a widget after find it by css:

selects = browser.find_by_css('#my-prefixed-formset select')
for s in selects:
    s.select('some-value')  # won't work
    s.find_by_value('some-value').first._element.click()  # works ok

The second line of the forloop uses the same approach of the select from the WebDriver instance. I propose to create the select option for the WebDriverElement too, just like the check, fill and type methods.

This is specially useful for formsets, when I don't want to know each field prefix to fill.

If you agree, I can send a pull request.

michelts avatar Nov 30 '12 18:11 michelts

Related to #8.

andrewsmedina avatar Dec 02 '12 17:12 andrewsmedina

Ok, I will keep the talk on the #8 ok?

michelts avatar Dec 03 '12 15:12 michelts

This issue is one of several things that the issue #8 deals.

We can use this issue to talk about the select behaviour.

andrewsmedina avatar Dec 03 '12 16:12 andrewsmedina

WebDriverElement currently supports the select method, so closing this issue.

javascript-error avatar Oct 17 '20 23:10 javascript-error