Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set content of the proper Select element with Django (2.x) Admin with fieldsets (spl 0.11.0)) #728

Open
zvolsky opened this issue Nov 6, 2019 · 0 comments
Labels

Comments

@zvolsky
Copy link

zvolsky commented Nov 6, 2019

# fails! probably Splinter 0.11.0 error
# selEl.select(opt.value) <============= FAILS, will set the 1-st select in fieldset, regardless we have in selEl only the 2nd one

ie. in code bellow we cannot select 'impact'. Regardless only 'impact' is selected, .select() changes always 'criticity'.

this replacement directly with webdriver works well:
    from selenium.webdriver.support.ui import Select
    select = Select(self.br.driver.find_element_by_name(selEl.first['name']))
    select.select_by_value(opt.value)  # or .select_by_visible_text('Banana')

class VyjimkyAdmin(admin.ModelAdmin):
    form = VyjimkyForm
    fieldsets = [
        (_("Vyjimky"), {
            'fields': ("vyjimka_id",
                       "name",
                       "reason",
                       ("criticity", "impact", "scope"))
        }),

@jsfehler jsfehler added the django Relates to the Django client label Mar 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants