-
Notifications
You must be signed in to change notification settings - Fork 5
/
locators.py
30 lines (24 loc) · 1.89 KB
/
locators.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
from selenium.webdriver.common.by import By
class MainPageLocators(object):
"""A class for main page locators. All main page locators should come here"""
SEARCH_BUTTON = ('CLASS_NAME', r'btn-search')
LOGIN = ('CSS_SELECTOR', r'#J_SiteNavLogin > div.site-nav-menu-hd > div.site-nav-sign > a.h')
USER_NICK = ('CSS_SELECTOR', r'#J_SiteNavLogin > div.site-nav-menu-hd > div.site-nav-user > a.site-nav-login-info-nick')
CHECK_IN = ('CSS_SELECTOR', r'body > div.screen-outer.clearfix > div.col-right > div.tbh-member.J_Module > div > div.member-bd > p > a.J_MemberPunch.h')
MY = ('CSS_SELECTOR', '#J_SiteNavLogin > div.site-nav-menu-hd > div.site-nav-user > a.site-nav-login-info-nick')
ACCOUNT = ('CSS_SELECTOR', '#J_SiteNavLoginPanel > div > div.site-nav-user-info > p.site-nav-user-operate > a:nth-child(1)')
class SearchResultsPageLocators(object):
"""A class for search results locators. All search results locators should come here"""
pass
class LoginPageLocators(object):
AUTH_BLOCK = ('ID', 'nc_1_n1z')
PASSWORD_LOGIN = ('CSS_SELECTOR', r'#J_QRCodeLogin > div.login-links > a.forget-pwd.J_Quick2Static')
USERNAME_INPUT = ('NAME', 'TPL_username')
PASSWORD_INPUT = ('NAME', 'TPL_password')
LOGIN_BUTTON = ('ID', 'J_SubmitStatic')
class CheckinPageLocators(object):
COIN = ('CSS_SELECTOR', r'#content > div.coin-layout > div.coin-wrapper > div.side-bar > div > div.coin-panel > div.tjb-wrapper.tjb-login > div.my-coin > p.lg-1.info.J_Coin > a')
BLOCK = ('CSS_SELECTOR', '#nc_1_n1z')
CLOSE1 = (By.CSS_SELECTOR, '#ks-content-ks-component118 > div.coin-overlay-content > span')
CLOSE2 = (By.CSS_SELECTOR, '#ks-content-ks-component210 > div.coin-overlay-content > span')
CHECK = (By.CSS_SELECTOR, r'#content > div.coin-layout > div.coin-wrapper > div.side-bar > div > div.coin-panel > div.tjb-wrapper.tjb-login > div.my-btns > a.btn.login-btn.J_GoTodayBtn')