-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtop_header.py
More file actions
68 lines (53 loc) · 2.15 KB
/
top_header.py
File metadata and controls
68 lines (53 loc) · 2.15 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
from playwright.sync_api import Locator
from .account_button import AccountButton
from .account_menu import AccountMenu
from .component import Component
from .currency_selector import CurrencySelector
from .language_selector import LanguageSelector
from .ship_to_selector import ShipToSelector
class TopHeader(Component):
@property
def language_selector(self) -> LanguageSelector:
return LanguageSelector(
root=self._root.locator("[data-test-id='language-selector']")
)
@property
def currency_selector(self) -> CurrencySelector:
return CurrencySelector(
root=self._root.locator("[data-test-id='currency-selector']")
)
@property
def dashboard_link(self) -> Locator:
return self._root.locator("[data-test-id='dashboard-link']")
@property
def contacts_link(self) -> Locator:
return self._root.locator("[data-test-id='contacts-link']")
@property
def support_phone_link(self) -> Locator:
return self._root.locator("[data-test-id='support-phone-link']")
@property
def contact_us_link(self) -> Locator:
return self._root.locator("[data-test-id='contact-us-link']")
@property
def operator_name_label(self) -> Locator:
return self._root.locator("[data-test-id='operator-name-label']")
@property
def sign_in_link(self) -> Locator:
return self._root.locator("[data-test-id='sign-in-link']")
@property
def sign_up_link(self) -> Locator:
return self._root.locator("[data-test-id='sign-up-link']")
@property
def account_button(self) -> AccountButton:
return AccountButton(root=self._root.locator("[data-test-id='account-button']"))
@property
def account_menu(self) -> AccountMenu:
return AccountMenu(root=self._root.locator("[data-test-id='account-menu']"))
@property
def add_shipping_address_button(self) -> Locator:
return self._root.locator("[data-test-id='add-shipping-address-button']")
@property
def ship_to_selector(self) -> ShipToSelector:
return ShipToSelector(
root=self._root.locator("[data-test-id='ship-to-selector']")
)