-
Notifications
You must be signed in to change notification settings - Fork 1
/
get_started.py
42 lines (36 loc) · 1.58 KB
/
get_started.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from sqlite3 import Time
from appium.webdriver.common.mobileby import MobileBy
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from getgauge.python import step
from step_impl.utils.driver import Driver
@step("changes color to pink")
def change_color():
colorElement = WebDriverWait(Driver.driver, 20).until(EC.element_to_be_clickable(
(MobileBy.ID, "com.lambdatest.proverbial:id/color")))
colorElement.click()
@step("changes the text to Proverbial")
def chnage_text():
textElement = WebDriverWait(Driver.driver, 20).until(
EC.element_to_be_clickable((MobileBy.ID, "com.lambdatest.proverbial:id/Text")))
textElement.click()
@step("toast will be visible")
def toast_visible():
toastElement = WebDriverWait(Driver.driver, 20).until(EC.element_to_be_clickable(
(MobileBy.ID, "com.lambdatest.proverbial:id/toast")))
toastElement.click()
@step("notification will be visible")
def notification():
notification = WebDriverWait(Driver.driver, 20).until(EC.element_to_be_clickable(
(MobileBy.ID, "com.lambdatest.proverbial:id/notification")))
notification.click()
@step("perform the speed test")
def speedTest():
speedTest = WebDriverWait(Driver.driver, 20).until(EC.element_to_be_clickable(
(MobileBy.ID, "com.lambdatest.proverbial:id/speedTest")))
speedTest.click()
@step("back to home")
def home():
home = WebDriverWait(Driver.driver, 20).until(EC.element_to_be_clickable(
(MobileBy.ID, "com.lambdatest.proverbial:id/buttonPage")))
home.click()