Closed
Bug 1007596
Opened 11 years ago
Closed 11 years ago
Remove MozMillElement type detection because it is simply broken
Categories
(Testing Graveyard :: Mozmill, defect, P2)
Testing Graveyard
Mozmill
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: andrei, Assigned: whimboo)
References
Details
We've seen this in bug 830379 where the `pageNumber` input element is of type `number`.
MozMillTextBox fails to identify this element as an input type, thus missing its `sendKeys` method.
We should revise the checks MozMillTextBox does here:
https://github.com/mozilla/mozmill/blob/c305151b137dc7325a3b153e8b385389551389b7/mozmill/mozmill/extension/resource/driver/mozelement.js#L1181-L1186
To make sure we have all elements that can be typed into.
Here are all types available on input elements:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input
Out of these the following support typing:
- color
- date
- datetime
- datetime-local
- email
- hidden (?)
- month
- number
- search
- tel
- text
- time
- url
- week
Given the high number of input types we should support, maybe we should change the way we identify them. Maybe a blacklist would be better...
Or maybe question whether we need a MozMillTextBox type at all?
We could have sendKeys on the regular MozmillElement... with contentEditable=true any HTML element can and should be able to receive text input.
| Assignee | ||
Comment 1•11 years ago
|
||
Instead of having such a long inclusion list, I would rename the class to MozMillInput and allow any type. Andrew, what is your point?
As we also talked about in our meeting today, the logic to determine the type of the elements is mostly over-enthusiastic and broken, especially for non-existent elements at this time. We should better get this removed totally and fallback to a single MozMillElement class. But that needs another discussion and bug.
Flags: needinfo?(ahalberstadt)
Comment 2•11 years ago
|
||
That seems reasonable to me. I think type checking was a bad idea in the first place. Better to do "feature detection" on the element and raise an exception if you try to use an incompatible method on it.
Flags: needinfo?(ahalberstadt)
| Assignee | ||
Comment 3•11 years ago
|
||
Sounds great. Thanks Andrew.
I will take this so we can have it fixed soon for version 2.1. Old methods we will keep and mark them as deprecated.
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Summary: MozMillTextBox fails to indetify elements of type "number" → Remove MozMillElement type detection because it is simply broken
| Assignee | ||
Comment 5•11 years ago
|
||
Mozmill will reach its end of life soon. We are currently working on getting
all the tests for Firefox ported to Marionette. For status updates please see
bug 1080766.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Whiteboard: [mozmill-2.1?]
Updated•9 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•