def test_locator_split_with_non_strings(finder: ElementFinder):
    assert finder._split_locator([]) == []
    assert finder._split_locator(None) == [None]
    locator = object
    assert finder._split_locator(locator) == [locator]
def test_localtor_split(finder: ElementFinder,
                        reporter: GenericDiffReporterFactory):
    results = [
        finder._split_locator("//div"),
        finder._split_locator("xpath://div"),
        finder._split_locator("xpath=//div"),
        finder._split_locator('//*[text(), " >> "]'),
        finder._split_locator('//*[text(), " >> "] >> css:foobar'),
        finder._split_locator('//*[text(), " >> "] >> //div'),
        finder._split_locator('//*[text(), " >> "] >> css:foobar >> id:tidii'),
        finder._split_locator(
            "identifier:id >> id=name >> name=id >> xpath://a >> dom=name >> link=id >> partial link=something >> "
            'css=#name >> class:name >> jquery=dom.find("foobar") >> sizzle:query.find("tidii") >> '
            "tag:name >> scLocator:tidii"),
        finder._split_locator(['//*[text(), " >> "]', "css:foobar", "tidii"]),
        finder._split_locator("xpath://*  >>  xpath://div"),
        finder._split_locator("xpAtH://* >> xPAth://div"),
        finder._split_locator("xpath : //a >> xpath : //div"),
        finder._split_locator('//*[text(), " >> css:"]'),
        finder._split_locator([
            '//*[text(), " >> css:"]',
        ]),
    ]
    verify_all("Split multi locator", results, reporter=reporter)