forked from gunesmes/page-object-python-selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocators.py
More file actions
19 lines (14 loc) · 659 Bytes
/
Copy pathlocators.py
File metadata and controls
19 lines (14 loc) · 659 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from selenium.webdriver.common.by import By
# for maintainability we can seperate web objects by page name
class MainPageLocators(object):
LOGO = (By.ID, 'nav-logo')
ACCOUNT = (By.ID, 'nav-link-accountList')
SIGNUP = (By.CSS_SELECTOR, '#nav-signin-tooltip > div > a')
LOGIN = (By.CSS_SELECTOR, '#nav-signin-tooltip > a')
SEARCH = (By.ID, 'twotabsearchtextbox')
SEARCH_LIST = (By.CSS_SELECTOR, 'div[data-component-type="s-search-result"]')
class LoginPageLocators(object):
EMAIL = (By.ID, 'ap_email')
PASSWORD = (By.ID, 'ap_password')
SUBMIT = (By.ID, 'signInSubmit-input')
ERROR_MESSAGE = (By.ID, 'message_error')