Closed djangofan closed 7 years ago
Ok, this is working for me:
text_field(:what, data_test: 'input-what')
So, the problem seems to be specific to text_area? I need to spend a little more time on this until I know for sure that this resolves my issue. I will update within the next couple weeks if this solution works for me and I find no other related problems.
I believe the only issue is that you were trying to access a text_field
with a text_area
method.
The page-object code looks like it is working as intended here.
text-area
works properly. The HTML you posted above is not a textarea. I'm going to close this issue. If you believe there is still a problem then please feel free to reopen.
I am encountering a problem with custom html attributes having dash characters.
I have HTML that looks like this:
<input id='input-what' data-test='input-what'>
And here is the ERROR I get when I try to use a page-object accessor to access that data-test attribute:
It works fine if I just change my element to hook to the id instead of the custom attribute:
text_field(:what, id: 'input-what')
Now, I can work around this for the moment, by bypassing page-object (see commented out code below), and using DIRECT Watir calls, with this code @titusfortner . This proves that Watir supports these types of elements but page-object currently does not. :