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
6b16d1fa
Commit
6b16d1fa
authored
Jul 26, 2021
by
mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review
parent
5a869348
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletions
+8
-1
src/pageobject/basepage.py
+3
-1
src/pageobject/loginpage.py
+2
-0
src/testcase/test_LoginPage.py
+3
-0
No files found.
src/pageobject/basepage.py
View file @
6b16d1fa
...
@@ -196,6 +196,8 @@ class Page(object):
...
@@ -196,6 +196,8 @@ class Page(object):
password_input
=
(
By
.
ID
,
"xmpwd"
)
password_input
=
(
By
.
ID
,
"xmpwd"
)
# 登录按钮
# 登录按钮
login_button
=
(
By
.
CLASS_NAME
,
"submit"
)
login_button
=
(
By
.
CLASS_NAME
,
"submit"
)
# 取消按钮
cancel_btn
=
(
By
.
XPATH
,
"""//span[text()="{}"]"""
.
format
(
"取 消"
))
# env = readConfig.get_env()
# env = readConfig.get_env()
# login_page.get_env_window()
# login_page.get_env_window()
# login_page.click_what('span', 'text()', self.env)
# login_page.click_what('span', 'text()', self.env)
...
@@ -222,7 +224,7 @@ class Page(object):
...
@@ -222,7 +224,7 @@ class Page(object):
# login_page.input_text(password_input, readConfig.test_header(user)['password'])
# login_page.input_text(password_input, readConfig.test_header(user)['password'])
# login_page.click(login_button)
# login_page.click(login_button)
# login_page.sleep(2)
# login_page.sleep(2)
if
login_page
.
ifElementExist
(
login_page
.
click_text
(
"取 消"
)
):
if
login_page
.
ifElementExist
(
cancel_btn
):
login_page
.
click_text
(
"取 消"
)
login_page
.
click_text
(
"取 消"
)
login_page
.
sleep
(
3
)
login_page
.
sleep
(
3
)
...
...
src/pageobject/loginpage.py
View file @
6b16d1fa
...
@@ -17,6 +17,8 @@ class LoginPage(Page):
...
@@ -17,6 +17,8 @@ class LoginPage(Page):
# 选择环境窗口的关闭按钮
# 选择环境窗口的关闭按钮
close_env_window_btn
=
(
By
.
XPATH
,
"//span[@class='anticon anticon-close ant-modal-close-icon']"
)
close_env_window_btn
=
(
By
.
XPATH
,
"//span[@class='anticon anticon-close ant-modal-close-icon']"
)
# 取消按钮
cancel_btn
=
(
By
.
XPATH
,
"""//span[text()="{}"]"""
.
format
(
"取 消"
))
# 验证元素
# 验证元素
# 店铺名称
# 店铺名称
store_name
=
(
By
.
XPATH
,
"""//div[@class="inst"]"""
)
store_name
=
(
By
.
XPATH
,
"""//div[@class="inst"]"""
)
...
...
src/testcase/test_LoginPage.py
View file @
6b16d1fa
...
@@ -37,6 +37,9 @@ class TestLoginPage(object):
...
@@ -37,6 +37,9 @@ class TestLoginPage(object):
login_page
.
excute_script_set_url
()
login_page
.
excute_script_set_url
()
login_page
.
sleep
(
1
)
login_page
.
sleep
(
1
)
if
login_page
.
ifElementExist
(
login_page
.
cancel_btn
):
login_page
.
click_text
(
"取 消"
)
login_page
.
sleep
(
3
)
# login_page.refresh()
# login_page.refresh()
# login_page.click_phone_login()
# login_page.click_phone_login()
# login_page.input_account(account=self.account)
# login_page.input_account(account=self.account)
...
...
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