def split_webdriver_subtest_pytest_name(test_name):
        """Splits a WebDriver test name in pytest format into a filename and a subtest name and
        returns both of them. E.g.

        test.py::foo.html -> (test.py, foo.html)
        test.py           -> (test.py, None)
        """
        names_after_split = test_name.split(
            Port.WEBDRIVER_SUBTEST_PYTEST_SEPARATOR)

        assert len(names_after_split) <= 2, \
            "%s has a length greater than 2 after split by ::" % (test_name)
        if len(names_after_split) == 1:
            return (names_after_split[0], None)

        return (names_after_split[0], names_after_split[1])