-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_screen.py
More file actions
33 lines (25 loc) · 1.08 KB
/
main_screen.py
File metadata and controls
33 lines (25 loc) · 1.08 KB
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
27
28
29
30
31
32
33
from typing import Literal
from locators.locators import Locators
from screens.base_screen import Screen
class MainScreen(Screen):
def __init__(self, driver):
super().__init__(driver)
self.locators = Locators()
def click_on_text_link(self):
self.click(locator=self.locators.main_menu.TEXT_LINK)
def tap_on_text_link(self):
self.tap(locator=self.locators.main_menu.TEXT_LINK)
def scroll_view_by_coordinates(self, direction: Literal["down", "up"] = "down"):
self.tap(locator=self.locators.main_menu.VIEWS_LINK)
self.scroll(directions=direction)
def scroll_to_image_button(self):
self.tap(locator=self.locators.main_menu.VIEWS_LINK)
self.scroll_to_element(
from_el=self.locators.views_menu.ANIMATION_LINK,
destination_el=self.locators.views_menu.IMAGE_BUTTON,
)
def scroll_until_text_field_visible(self):
self.tap(locator=self.locators.main_menu.VIEWS_LINK)
self.scroll_until_element_visible(
destination_el=self.locators.views_menu.TEXT_FIELDS
)