Closed
Bug 832045
Opened 11 years ago
Closed 11 years ago
[B2G] get_attribute('disabled') returns false regardless of disabled attribute
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla27
People
(Reporter: zcampbell, Assigned: automatedtester)
References
Details
Attachments
(2 files, 3 obsolete files)
555 bytes,
text/plain
|
Details | |
1.63 KB,
patch
|
jgriffin
:
review+
|
Details | Diff | Splinter Review |
Marionette is returning 'false' for every HTMLElement.get_attribute('disabled') The element in question is the 'capture-button' in the camera app: https://github.com/mozilla-b2g/gaia/blob/master/apps/camera/index.html#L24 After the app starts up the 'disabled' attribute is removed however marionette still returns 'false'. Minimized test case.
Comment 1•11 years ago
|
||
CC'ing David Burns for his input.
Updated•11 years ago
|
OS: Windows 7 → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Assignee | ||
Comment 2•11 years ago
|
||
If the element has a disabled attribute then we should return true and if it doesnt then we should a false so <div disable=disable> should return true and <div> should return false. This is what has been discussed in the HTML5 spec[1] and thats what we should be following. [1] http://www.whatwg.org/specs/web-apps/current-work/#boolean-attributes
Assignee | ||
Comment 3•11 years ago
|
||
can't seem to see the issue. Pushed https://tbpl.mozilla.org/?tree=Try&rev=410dec044941 to try to see I could reproduce elsewhere.
Assignee | ||
Comment 4•11 years ago
|
||
loos like I forgot the html file added and new tries https://tbpl.mozilla.org/?tree=Try&rev=885a6cf483c0 https://tbpl.mozilla.org/?tree=Try&rev=ad05bde5afe4
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(dburns)
Assignee | ||
Comment 5•11 years ago
|
||
This is working as it should, we mostly. Its not coercing the data returned to python primatives. e.g. AssertionError: True != u'true'. Will fix that in this bug
Flags: needinfo?(dburns)
Assignee | ||
Comment 6•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=c8c2e8d5351b https://tbpl.mozilla.org/?tree=Try&rev=2aca65ba7498
Assignee | ||
Comment 7•11 years ago
|
||
Assignee | ||
Comment 8•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #806691 -
Attachment is obsolete: true
Assignee | ||
Comment 9•11 years ago
|
||
Attachment #806692 -
Attachment is obsolete: true
Attachment #806703 -
Flags: review?(jgriffin)
Comment 10•11 years ago
|
||
So, this is kind of a weird case. DOM attributes are always strings, so even in JS, calling getAttribute('disabled') will return a string value, not a boolean. This matches what the Selenium atom does, that we're using to get attribute values. I'm not positive we want to cast this to a Boolean in Python, since it isn't how Selenium or DOM API's behave.
Comment 11•11 years ago
|
||
I guess, for consistency, we should do what the FirefoxDriver does...does it do this casting?
Assignee | ||
Comment 12•11 years ago
|
||
For some reason I thought we coerced it in the Selenium code... I could have sworn I wrote it that way originally but its not like that now so we will leave it as it is and close the bug. Happy to land the test as that might be useful. Thoughts?
Assignee | ||
Updated•11 years ago
|
Attachment #806703 -
Flags: review?(jgriffin)
Comment 13•11 years ago
|
||
Yes, might as well land the test!
Assignee | ||
Comment 14•11 years ago
|
||
just the test in the patch. MOAR TESTS!!!
Attachment #806703 -
Attachment is obsolete: true
Attachment #806895 -
Flags: review?(jgriffin)
Comment 15•11 years ago
|
||
Comment on attachment 806895 [details] [diff] [review] bug832045.patch Review of attachment 806895 [details] [diff] [review]: ----------------------------------------------------------------- Thanks.
Attachment #806895 -
Flags: review?(jgriffin) → review+
Assignee | ||
Comment 16•11 years ago
|
||
test landed in https://hg.mozilla.org/integration/mozilla-inbound/rev/06141d2c7302
https://hg.mozilla.org/mozilla-central/rev/06141d2c7302
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Updated•1 year ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•