-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnavigation_steps.py
26 lines (18 loc) · 1.01 KB
/
navigation_steps.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
__all__ = ['navigate_to_main_page']
from common.facade import logger
from sample.mobile.src.confirmations.location_permission import LocationPermissionAndroid
from sample.mobile.steps.page_steps.pages.setup_notification import SetupNotificationSteps
from sample.mobile.steps.page_steps.pages.setup_location import SetupLocationSteps
from sample.mobile.steps.page_steps.pages.weather import WeatherSteps
def navigate_to_main_page():
logger.log_title("Navigate to main Weather Page")
location_permission = LocationPermissionAndroid(should_present=False)
if location_permission.is_page_present(second=2):
location_permission.deny()
setup_notification_page = SetupNotificationSteps(should_present=False)
if setup_notification_page.is_page_present(second=2):
setup_notification_page.click_decline()
setup_location_page = SetupLocationSteps(should_present=False)
if setup_location_page.is_page_present(second=2):
setup_location_page.click_continue()
return WeatherSteps()