Skip to content

Can't set value of Input Element #20

@BradVanDuker

Description

@BradVanDuker

I'm not sure if this is a bug or not, but the behavior seems inconsistent.
Elements Input and Text_Field share a value attribute, but only the latter element can set it.

Meta -

Nerodia Version: 0.11.0
Selenium Version: 3.141.0
Browser Version: firefox
Browser Driver Version:
OS Version: Windows 10 Pro

Expected Behavior -

For more consistency Value should be a settable value

Actual Behavior -

Input.value can't be set.
Input.set() doesn't exist

If handled as a text field, things work fine. Both share the 'value' attribute.

Steps to reproduce -

input = browser.input(name='title')
input
#<Input: located: False; {'name': 'title', 'tag_name': 'input'}>
input.value
'Test123'
input
#<Input: located: True; {'name': 'title', 'tag_name': 'input'}>
input.value = 'Test456'
Traceback (most recent call last):
File "", line 1, in
AttributeError: can't set attribute
input.set('Test456') # AttributeError: Element 'Input' has no attribute 'set'
tf = browser.text_field(name='title')
tf
#<TextField: located: False; {'name': 'title', 'tag_name': 'input'}>
tf.value
'Test123'
tf
#<TextField: located: True; {'name': 'title', 'tag_name': 'input'}>
tf.value = 'Test456'
tf.value
'Test456'
tf.set('Test789')
tf.value
'Test789'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions