Bug 1370863 - Remove Marionette.log API from client; r=automatedtester draft
authorAndreas Tolfsen <ato@sny.no>
Fri, 09 Jun 2017 14:28:15 +0100
changeset 598400 17d6516916790ce69b86961ca809a8b7116dfa61
parent 598399 3ae2bb18bda02a9dcdea2caf3eb04a66f5ea72f3
child 598401 498262aaf9d19c3cd91548a85e56a83249ec9fb5
push id65195
push userbmo:ato@sny.no
push dateWed, 21 Jun 2017 18:07:04 +0000
reviewersautomatedtester
bugs1370863
milestone56.0a1
Bug 1370863 - Remove Marionette.log API from client; r=automatedtester MozReview-Commit-ID: FjBQ2p1DyLn
testing/marionette/client/docs/advanced/debug.rst
testing/marionette/client/marionette_driver/marionette.py
--- a/testing/marionette/client/docs/advanced/debug.rst
+++ b/testing/marionette/client/docs/advanced/debug.rst
@@ -9,36 +9,16 @@ that can be useful to you.
 
 Please note that the best tools for debugging are the `ones that ship with
 Gecko`_. This page doesn't describe how to use those with Marionette. Also see
 a related topic about `using the debugger with Marionette`_ on MDN.
 
 .. _ones that ship with Gecko: https://developer.mozilla.org/en-US/docs/Tools
 .. _using the debugger with Marionette: https://developer.mozilla.org/en-US/docs/Marionette/Debugging
 
-
-Storing Logs on the Server
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-By calling :func:`~Marionette.log` it is possible to store a message on the
-server.
-Logs can later be retrieved using :func:`~Marionette.get_logs`. For example::
-
-    try:
-        marionette.log("Sending a click event") # logged at INFO level
-        elem.click()
-    except:
-        marionette.log("Something went wrong!", "ERROR")
-
-    print(marionette.get_logs())
-
-Disclaimer: Example for illustrative purposes only, don't actually hide
-tracebacks like that!
-
-
 Seeing What's on the Page
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Sometimes it's difficult to tell what is actually on the page that is being
 manipulated. Either because it happens too fast, the window isn't big enough or
 you are manipulating a remote server! There are two methods that can help you
 out. The first is :func:`~Marionette.screenshot`::
 
--- a/testing/marionette/client/marionette_driver/marionette.py
+++ b/testing/marionette/client/marionette_driver/marionette.py
@@ -1860,44 +1860,16 @@ class Marionette(object):
             "findElements", body, key="value" if self.protocol == 1 else None)
 
     def get_active_element(self):
         el_or_ref = self._send_message("getActiveElement", key="value")
         if self.protocol < 3:
             return HTMLElement(self, el_or_ref)
         return el_or_ref
 
-    def log(self, msg, level="INFO"):
-        """Stores a timestamped log message in the Marionette server
-        for later retrieval.
-
-        :param msg: String with message to log.
-        :param level: String with log level (e.g. "INFO" or "DEBUG").
-            Defaults to "INFO".
-        """
-        body = {"value": msg, "level": level}
-        self._send_message("log", body)
-
-    def get_logs(self):
-        """Returns the list of logged messages.
-
-        Each log message is an array with three string elements: the level,
-        the message, and a date.
-
-        Usage example::
-
-            marionette.log("I AM INFO")
-            marionette.log("I AM ERROR", "ERROR")
-            logs = marionette.get_logs()
-            assert logs[0][1] == "I AM INFO"
-            assert logs[1][1] == "I AM ERROR"
-        """
-        return self._send_message("getLogs",
-                                  key="value" if self.protocol == 1 else None)
-
     def add_cookie(self, cookie):
         """Adds a cookie to your current session.
 
         :param cookie: A dictionary object, with required keys - "name"
             and "value"; optional keys - "path", "domain", "secure",
             "expiry".
 
         Usage example: