Пример #1
0
def test_create_folder_and_items(browser, mobile):
    functions.login(browser)
    my_maps = FirstPage(browser)
    my_maps.load()
    my_maps.my_maps()

    my_maps = MyMapsPage(browser)
    my_maps.create_folder('new folder')

    SEARCH: str = 'Rudolfinum'
    functions.search_element(browser, SEARCH)

    search = SearchPage(browser)
    search.save_exact_match()

    save_page = SavePage(browser)
    save_page.select_folder('new folder')
    save_page.save()

    planning = FirstPage(browser)
    planning.load()
    planning.planning()

    auto = PlanningPage(browser)
    # auto.auto()

    auto.start()
    auto.end()

    auto.save_route()

    save_page = SavePage(browser)
    save_page.change_name('Route')
    save_page.select_folder('new folder')
    save_page.save()

    elem = functions.check_mobile_folder(mobile)
    elem = mobile.find_element_by_id('cz.seznam.mapy:id/image').click()
    folder_screen = FolderScreen(mobile)
    print(len(folder_screen.get_titles))

    mobile.back()

    #delete
    functions.delete_folder(mobile)
Пример #2
0
def test_osm_poi(browser, mobile):

    functions.login(browser)

    SEARCH: str = 'London Eye'
    functions.search_element(browser, SEARCH)

    search = SearchPage(browser)
    search.save_exact_match()

    save_page = SavePage(browser)
    save_page.save()

    # mobile
    elem = functions.check_mobile_item(mobile)
    assert elem.get_attribute('text') == SEARCH

    # delete folder on web
    functions.delete_poi(mobile)
Пример #3
0
def test_firm_poi(browser, mobile):
    functions.login(browser)

    SEARCH: str = 'Plzeňský restaurant Anděl'

    functions.search_element(browser, SEARCH)

    search = SearchPage(browser)
    # search.close_exact_search()
    search.save_exact_match()

    save_page = SavePage(browser)
    save_page.save()

    # mobile
    elem = functions.check_mobile_item(mobile)
    assert elem.get_attribute('text') == SEARCH

    # delete folder on web
    functions.delete_poi(mobile)
Пример #4
0
def test_pubt_poi(browser, mobile):
    functions.login(browser)

    SEARCH: str = 'Zborovská zastávka tramvaje'

    functions.search_element(browser, SEARCH)

    search = SearchPage(browser)
    try:
        search.search_result_several()
        search.save_exact_match()
    except:
        search.save_exact_match()
    save_page = SavePage(browser)
    save_page.save()

    # mobile
    elem = functions.check_mobile_item(mobile)
    assert elem.get_attribute('text') == 'Zborovská'

    # delete folder on web
    functions.delete_poi(mobile)
Пример #5
0
def test_poi_changed_name(browser, mobile):
    functions.login(browser)

    SEARCH: str = 'Rudolfinum'

    functions.search_element(browser, SEARCH)

    search = SearchPage(browser)
    # search.close_exact_search()
    search.save_exact_match()

    save_page = SavePage(browser)
    save_page.change_name('Poi s vlastním názvem')
    save_page.save()

    # mobile
    elem = functions.check_mobile_item(mobile)
    assert elem.get_attribute('text') == 'Poi s vlastním názvem'

    # delete folder on web

    functions.delete_poi(mobile)