forked from tripleten-com/QA-USA_S8-POM-Tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_text_bike_after_click.py
54 lines (39 loc) · 1.34 KB
/
test_text_bike_after_click.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
43
44
45
46
47
48
49
50
51
52
53
54
import time
from selenium import webdriver
from urban_routes_main_page import UrbanRoutesPage # Import the POM class
def test_custom_bike_option():
# Step 1: Open the app - update the URL after starting the server
driver = webdriver.Chrome()
driver.get('https://cnt-fb54dfc4-00e8-44d6-afed-f197da701aeb.containerhub.tripleten-services.com')
# Create an instance of the page class
urban_routes_page = UrbanRoutesPage(driver)
# Use POM methods to perform actions on the page
# Enter "From" and "To" locations.
...
# Select the "Custom" option
...
time.sleep(2) # Adding delay for visibility; optional
# Click the "Bike" icon
...
time.sleep(2) # Adding delay for visibility; optional
# Verify the Bike text is displayed correctly
actual_value = ...
expected_value = ...
assert ...
driver.quit()
def test_duration_custom_bike_option():
driver = webdriver.Chrome()
driver.get('https://cnt-40f1fd73-8341-459a-8091-2b64d29eea26.containerhub.tripleten-services.com')
urban_routes_page = UrbanRoutesPage(driver)
# Use the "enter_locations" step to enter both locations
...
# Select the "Custom" option
...
time.sleep(2)
# Select the "Bike" icon
...
time.sleep(2)
actual_value = ...
expected_value = ...
assert ...
driver.quit()