Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xm-uitest-sow
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiamai-test
xm-uitest-sow
Commits
c29b55ae
Commit
c29b55ae
authored
Jul 06, 2021
by
linguangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
操作被隐藏的元素界面可视-2,公共方法login添加
parent
8f95d578
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/pageobject/basepage.py
+5
-3
No files found.
src/pageobject/basepage.py
View file @
c29b55ae
...
@@ -132,15 +132,17 @@ class Page(object):
...
@@ -132,15 +132,17 @@ class Page(object):
def
login
(
self
):
def
login
(
self
):
driver
=
self
.
driver
driver
=
self
.
driver
login_page
=
Page
(
driver
=
driver
)
login_page
=
Page
(
driver
=
driver
)
# 手机号登录按钮
#
#
手机号登录按钮
phone_login
=
(
By
.
ID
,
"rc-tabs-0-tab-2"
)
#
phone_login = (By.ID, "rc-tabs-0-tab-2")
# 账号输入框
# 账号输入框
account_input
=
(
By
.
ID
,
"xmphone"
)
account_input
=
(
By
.
ID
,
"xmphone"
)
# 密码输入框
# 密码输入框
password_input
=
(
By
.
ID
,
"xmpwd"
)
password_input
=
(
By
.
ID
,
"xmpwd"
)
# 登录按钮
# 登录按钮
login_button
=
(
By
.
CLASS_NAME
,
"submit"
)
login_button
=
(
By
.
CLASS_NAME
,
"submit"
)
login_page
.
click
(
phone_login
)
# login_page.click(phone_login)
login_page
.
excute_script
(
"form xm_phone_login"
)
login_page
.
sleep
(
2
)
login_page
.
input_text
(
account_input
,
readConfig
.
test_account
())
login_page
.
input_text
(
account_input
,
readConfig
.
test_account
())
login_page
.
input_text
(
password_input
,
readConfig
.
test_password
())
login_page
.
input_text
(
password_input
,
readConfig
.
test_password
())
login_page
.
click
(
login_button
)
login_page
.
click
(
login_button
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment