Compares two items for identity. The items can be either single
        values or lists of values. When comparing lists, identity
        obtains when the two lists have the same number of elements
        and that the element at position in one list is identical to
        the element at the same position in the other list.

        This method is meant to be used for comparing lists of DOM
        nodes. It would also work with lists of booleans, integers,
        and similar primitive types, but is pointless in such
        cases. Also note that this method cannot meaningfully compare
        lists of lists or lists of dictionaries since the objects that
        would be part of the list would be created anew by Selenium's
        marshalling procedure. Hence, in these cases, the assertion
        would always fail.

        :param first: The first item to compare.
        :type first:
                     :class:`selenium.webdriver.remote.webelement.WebElement`
                     or array of
                     :class:`selenium.webdriver.remote.webelement.WebElement`.
        :param second: The second item to compare.
        :type second:
           :class:`selenium.webdriver.remote.webelement.WebElement` or
           :array of
           :class:`selenium.webdriver.remote.webelement.WebElement`.
        :raises: :class:`AssertionError` when unequal.

def assert_same(self, first, second):
        """
        Compares two items for identity. The items can be either single
        values or lists of values. When comparing lists, identity
        obtains when the two lists have the same number of elements
        and that the element at position in one list is identical to
        the element at the same position in the other list.

        This method is meant to be used for comparing lists of DOM
        nodes. It would also work with lists of booleans, integers,
        and similar primitive types, but is pointless in such
        cases. Also note that this method cannot meaningfully compare
        lists of lists or lists of dictionaries since the objects that
        would be part of the list would be created anew by Selenium's
        marshalling procedure. Hence, in these cases, the assertion
        would always fail.

        :param first: The first item to compare.
        :type first:
                     :class:`selenium.webdriver.remote.webelement.WebElement`
                     or array of
                     :class:`selenium.webdriver.remote.webelement.WebElement`.
        :param second: The second item to compare.
        :type second:
           :class:`selenium.webdriver.remote.webelement.WebElement` or
           :array of
           :class:`selenium.webdriver.remote.webelement.WebElement`.
        :raises: :class:`AssertionError` when unequal.
        """
        if not isinstance(first, list):
            first = [first]
        if not isinstance(second, list):
            second = [second]
        if not self.driver.execute_script("""
        var first = arguments[0];
        var second = arguments[1];
        if (first.length != second.length)
            return false;
        for(var i = 0; i < first.length; ++i)
            if (first[i] !== second[i])
                return false;
        return true;
        """, first, second):
            raise AssertionError("unequal")