def split_webdriver_test_name(test_name):
        """Splits a WebDriver test name 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)
        """
        separator_index = test_name.find(Port.WEBDRIVER_SUBTEST_SEPARATOR)
        if separator_index == -1:
            return (test_name, None)
        webdriver_test_name = test_name[:separator_index]
        separator_len = len(Port.WEBDRIVER_SUBTEST_SEPARATOR)
        subtest_suffix = test_name[separator_index + separator_len:]
        return (webdriver_test_name, subtest_suffix)