def test_measurement(browser, mobile): functions.login(browser) measure = FirstPage(browser) measure.load() measure.tools() measure = ToolsPage(browser) measure.measurement() measure = MeasurementPage(browser) measure.add() measure.save() save_page = SavePage(browser) save_page.change_name('Measurement') save_page.save() #mobile check # mobile elem = functions.check_mobile_item(mobile) assert elem.get_attribute('text') == 'Measurement' functions.delete_poi(mobile)
def test_trip_bike(browser, mobile): functions.login(browser) trip = FirstPage(browser) trip.load() trip.trip() trip = TripPage(browser) trip.bike() trip.change_dist() for i in range(100000000): pass trip.save_trip() save_page = SavePage(browser) save_page.change_name('Bike trip') save_page.save() #mobile check # mobile elem = functions.check_mobile_item(mobile) assert elem.get_attribute('text') == 'Bike trip' # delete folder on web functions.delete_poi(mobile)
def test_my_marks(browser, mobile, num_points): functions.login(browser) marks = FirstPage(browser) marks.load() marks.tools() marks = ToolsPage(browser) marks.my_marks() marks = MyPoiPage(browser, num_points) marks.add_points() marks.rename_last() marks.stop_adding() marks.save() save_page = SavePage(browser) save_page.change_name('One point') save_page.save() # # #mobile check # # mobile elem = functions.check_mobile_item(mobile) assert elem.get_attribute('text') == 'One point' # delete folder on web functions.delete_poi(mobile)
def test_planning7(browser, mobile): functions.login(browser) planning = FirstPage(browser) planning.load() planning.planning() auto = PlanningPage(browser) auto.foot() auto.foot_short() auto.start_boat() auto.end_boat() auto.save_route() save_page = SavePage(browser) save_page.change_name('Route foot short') save_page.save() # mobile check # mobile # #elem = functions.check_mobile_item(mobile, 'Route foot short') elem = functions.check_mobile_item(mobile) assert elem.get_attribute('text') == 'Route foot short' # delete folder on web timeout() functions.delete_poi(mobile)
def login(browser): my_maps = FirstPage(browser) my_maps.load() my_maps.my_maps() login = LoginPage(browser) login.sign_in()
def test_planning5(browser, mobile): functions.login(browser) planning = FirstPage(browser) planning.load() planning.planning() auto = PlanningPage(browser) auto.bike() auto.start() auto.end() auto.save_route() save_page = SavePage(browser) save_page.change_name('Route bike') save_page.save() # mobile check # mobile elem = functions.check_mobile_item(mobile) assert elem.get_attribute('text') == 'Route bike' # delete folder on web functions.delete_poi(mobile)
def test_folder_sync(browser, mobile): functions.login(browser) my_maps = FirstPage(browser) my_maps.load() my_maps.my_maps() my_maps = MyMapsPage(browser) my_maps.create_folder('Changed names') # #mobile # USER_NAME = 'mapytesting2' # PASSWORD = '******' # # main_screen = MainScreen(mobile) # main_screen.menu_click() # # menu_screen = MenuScreen(mobile) # menu_screen.log_in() # # login_screen = LogInScreen(mobile) # login_screen.user_name(USER_NAME) # login_screen.password(PASSWORD) # login_screen.sign_in_button() # mobile elem = functions.check_mobile_folder(mobile) assert elem.get_attribute('text') == 'Changed names' #delete functions.delete_folder(mobile)
def test_mapy_change(browser): change = FirstPage(browser) change.load() change.change_map_historic() #open change map menu and ckeck if historic is active change.change_map() assert browser.find_element(By.CSS_SELECTOR, "li[class='19stoleti active']")
def test_mapy_search(browser): SEARCH = 'Dresden' search = FirstPage(browser) search.load() search.search(SEARCH) search_result = SearchPage(browser) assert search_result.search_result() == 'Dresden'
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)
def check_web_folder(browser): # web check my_maps = FirstPage(browser) my_maps.load() my_maps.my_maps() login = LoginPage(browser) login.sign_in() my_maps = FirstPage(browser) my_maps.load() my_maps.my_maps() my_maps = MyMapsPage(browser) elem = WebDriverWait(browser, 10).until( EC.presence_of_element_located( (By.XPATH, "/html/body/div/div[2]/div[2]/div[1]/div/div[3]/div/ul[1]/li/div/div[2]/h2"))) return elem
def return_web_items(browser): # web check my_maps = FirstPage(browser) my_maps.load() my_maps.my_maps() login = LoginPage(browser) login.sign_in() my_maps = FirstPage(browser) my_maps.load() my_maps.my_maps() my_maps = MyMapsPage(browser) elem = WebDriverWait(browser, 10).until( EC.presence_of_element_located( (By.XPATH, "//h2[@class='title overflow-ellipsis']"))) elems = browser.find_elements_by_xpath("//h2[@class='title overflow-ellipsis']") return elems
def test_coor_changed_name(browser, mobile): functions.login(browser) coor = FirstPage(browser) coor.load() coor.coor() poi = SearchPage(browser) poi.save_exact_match() save_page = SavePage(browser) save_page.save() #mobile check # mobile elem = functions.check_mobile_item(mobile) assert elem.get_attribute('text') == 'Position on the map' # delete folder on web functions.delete_poi(mobile)
def test_trip_foot(browser, mobile): functions.login(browser) trip = FirstPage(browser) trip.load() trip.trip() trip = TripPage(browser) #trip.foot() trip.save_trip() save_page = SavePage(browser) save_page.change_name('Foot trip') save_page.save() #mobile check # mobile elem = functions.check_mobile_item(mobile) assert elem.get_attribute('text') == 'Foot trip' # delete folder on web functions.delete_poi(mobile)
def search_element(mobile, SEARCH): search = FirstPage(browser) search.load() search.search(SEARCH)