-
Notifications
You must be signed in to change notification settings - Fork 13
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
Can't set value of Input Element #20
Comments
Hi @BradVanDuker, thanks or the ticket! What did you try to set the value of an input element using Nerodia? One suggested approach would be
Let me know if this works or what else you've tried! |
First time using bug report on github and the issue was submitted without details (oops!). Initial post edited with more description and console input/output. |
I forgot to include in the colsole that Input elements don't have a set function
|
@BradVanDuker is there a specific reason you're using |
After upgrading to the latest version things still stand. |
@BradVanDuker I'm sorry I didn't notice earlier, but
If you'd prefer to use I've verified everything is working fine with a basic example using |
The website I'm testing uses input fields but often doesn't define the type attribute. There's also a lot of div's being used as buttons and inputs. Trying to get a handle on a field via browser.element() or browser.input() works, but using browser.text_field() does not (because there's no explicit tag_type of text_field). It just seemed a bit odd since value is an attribute of something called Input but you can't really set an Input's vale. The to_subtype method looks like it will be handy. Thank you very much for pointing that out. |
@lmtierney if type isn't otherwise specified, it should be treating the input element as a text field. |
@titusfortner it has the same behavior in Watir. Maybe we need to raise this in Watir as well.
|
@lmtierney In Watir it should be: |
Sorry, I didn't read your whole post before replying... The right answer is that using For instance this spec: So in Watir this should work for an input without a type specified:
|
Nerodia equivalents of the links @titusfortner provided: nerodia/nerodia/elements/text_field.py Lines 13 to 14 in 024c215
nerodia/tests/browser/elements/text_field_tests.py Lines 48 to 49 in 117fd18
|
W3 standard says , "The missing value default is the Text state." if the Input element is not really meant to be used directly, perhaps browser.Input() should return a text field by default. |
Right, if it doesn't have a type specified, then it is displayed in the browser as a text field, so you should use the There are implementation reasons that something might be an |
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 -
The text was updated successfully, but these errors were encountered: