Closed Bug 1036498 Opened 6 years ago Closed 6 years ago

Add deprecation warnings for location and size on element

Categories

(Testing :: Marionette, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla34

People

(Reporter: automatedtester, Assigned: automatedtester)

References

Details

(Keywords: pi-marionette-spec)

Attachments

(1 file)

in bug 1036365 we need to add deprecation warnings for location and size since these have been superceeded by getElementRect
when doing this we will also need to correct location and see if there are broken tests for that
Assignee: nobody → dburns
Status: NEW → ASSIGNED
Attachment #8462779 - Flags: review?(jgriffin)
Comment on attachment 8462779 [details] [diff] [review]
Add deprecation warnings to HTMLElement#size and HTMLElement#location in Marionette

Review of attachment 8462779 [details] [diff] [review]:
-----------------------------------------------------------------

::: testing/marionette/client/marionette/marionette.py
@@ +141,5 @@
>      def size(self):
>          '''
>          A dictionary with the size of the element.
>          '''
> +        warnings.warn("This property has been deprecated and will be removed in a future version. \

Should we say 'The size property', rather than 'This property'?

@@ +163,5 @@
>  
>          :returns: a dictionary containing x and y as entries
>  
>          """
> +        warnings.warn("This property has been deprecated and will be removed in a future version. \

Same as above.
Attachment #8462779 - Flags: review?(jgriffin) → review+
https://hg.mozilla.org/mozilla-central/rev/bd63119d9f36
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
David, DeprecationWarning is ignored by default. Do we need to turn on the warnings filter to let user know location and size will be deprecated?
You need to log in before you can comment on or make changes to this bug.