tryexceptpass / sofi

an OS agnostic UI module for Python
MIT License
387 stars 49 forks source link

Getting value from input field #93

Closed t-brito closed 6 years ago

t-brito commented 6 years ago

Hey,

Apologies for posting here, wasn't sure where else to write this.

I was wondering how I can get the attribute (and text) from a particular field.

Specifically, I am looking to get the value attribute from the \<input> field. I don't see a 'value' attribute for the Input() class that I can retrieve, and the functions under the Sofi() class which take a selector (such as text(), attr() etc) are all setters, I could not find one which would give me the current value.

Am I missing something really obvious?

Thanks a lot, and great project by the way!

tryexceptpass commented 6 years ago

Thanks so much for the issue, seems I forgot to put those in! Watch for a new commit / version which will include gettext(selector), getattribute(selector, attr) and getproperty(selector, prop) methods at the application class level. I'll update sample.py with some usage as well.

tryexceptpass commented 6 years ago

Fixed in 51526c8