Bug 1370863 - Remove Marionette.log API from client; r=automatedtester
MozReview-Commit-ID: FjBQ2p1DyLn
--- 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: