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
42699799
Commit
42699799
authored
Jul 07, 2021
by
linguangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review
parent
6d2fc240
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
16 deletions
+28
-16
.idea/workspace.xml
+13
-7
config/readConfig.py
+1
-1
src/pageobject/basepage.py
+14
-8
No files found.
.idea/workspace.xml
View file @
42699799
...
@@ -4,11 +4,9 @@
...
@@ -4,11 +4,9 @@
<option
name=
"autoReloadType"
value=
"SELECTIVE"
/>
<option
name=
"autoReloadType"
value=
"SELECTIVE"
/>
</component>
</component>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"00f4febb-36b6-426d-bfe6-b023876a617e"
name=
"Default Changelist"
comment=
"
增加了调试中的切换环境方法
"
>
<list
default=
"true"
id=
"00f4febb-36b6-426d-bfe6-b023876a617e"
name=
"Default Changelist"
comment=
"
请求头添加enterpriseId,并且设置各个请求头参数为变量,在config.ini中设置
"
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/config/config.ini"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/config/config.ini"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/config/readConfig.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/config/readConfig.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/config/readConfig.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/config/readConfig.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/framework/common.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/framework/common.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/pageobject/basepage.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/pageobject/basepage.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/pageobject/basepage.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/pageobject/basepage.py"
afterDir=
"false"
/>
</list>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
@@ -162,7 +160,7 @@
...
@@ -162,7 +160,7 @@
<recent
name=
"C:\Users\Administrator\PycharmProjects\xm-uitest-live"
/>
<recent
name=
"C:\Users\Administrator\PycharmProjects\xm-uitest-live"
/>
</key>
</key>
</component>
</component>
<component
name=
"RunManager"
selected=
"Python
.demo
"
>
<component
name=
"RunManager"
selected=
"Python
tests.pytest for test_WhiteBoardPage.TestLivePage
"
>
<configuration
name=
"demo"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<configuration
name=
"demo"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<module
name=
"xm-uitest-live"
/>
<module
name=
"xm-uitest-live"
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
...
@@ -250,9 +248,9 @@
...
@@ -250,9 +248,9 @@
</configuration>
</configuration>
<recent_temporary>
<recent_temporary>
<list>
<list>
<item
itemvalue=
"Python tests.pytest for test_WhiteBoardPage.TestLivePage"
/>
<item
itemvalue=
"Python.demo"
/>
<item
itemvalue=
"Python.demo"
/>
<item
itemvalue=
"Python tests.pytest for test_WhiteBoardPage.TestLivePage.testWhiteBoard"
/>
<item
itemvalue=
"Python tests.pytest for test_WhiteBoardPage.TestLivePage.testWhiteBoard"
/>
<item
itemvalue=
"Python tests.pytest for test_WhiteBoardPage.TestLivePage"
/>
<item
itemvalue=
"Python tests.pytest for test_LoginPage.TestLoginPage.testLogin"
/>
<item
itemvalue=
"Python tests.pytest for test_LoginPage.TestLoginPage.testLogin"
/>
<item
itemvalue=
"Python tests.pytest for test_LoginPage.TestLoginPage"
/>
<item
itemvalue=
"Python tests.pytest for test_LoginPage.TestLoginPage"
/>
</list>
</list>
...
@@ -452,7 +450,14 @@
...
@@ -452,7 +450,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1625640405518
</updated>
<updated>
1625640405518
</updated>
</task>
</task>
<option
name=
"localTasksCounter"
value=
"26"
/>
<task
id=
"LOCAL-00026"
summary=
"请求头添加enterpriseId,并且设置各个请求头参数为变量,在config.ini中设置"
>
<created>
1625646987045
</created>
<option
name=
"number"
value=
"00026"
/>
<option
name=
"presentableId"
value=
"LOCAL-00026"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1625646987045
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"27"
/>
<servers
/>
<servers
/>
</component>
</component>
<component
name=
"TestHistory"
>
<component
name=
"TestHistory"
>
...
@@ -568,7 +573,8 @@
...
@@ -568,7 +573,8 @@
<MESSAGE
value=
"review"
/>
<MESSAGE
value=
"review"
/>
<MESSAGE
value=
"添加本地文件路径区分mac/windows"
/>
<MESSAGE
value=
"添加本地文件路径区分mac/windows"
/>
<MESSAGE
value=
"增加了调试中的切换环境方法"
/>
<MESSAGE
value=
"增加了调试中的切换环境方法"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"增加了调试中的切换环境方法"
/>
<MESSAGE
value=
"请求头添加enterpriseId,并且设置各个请求头参数为变量,在config.ini中设置"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"请求头添加enterpriseId,并且设置各个请求头参数为变量,在config.ini中设置"
/>
</component>
</component>
<component
name=
"editorHistoryManager"
>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/server.log"
/>
<entry
file=
"file://$PROJECT_DIR$/server.log"
/>
...
...
config/readConfig.py
View file @
42699799
...
@@ -35,5 +35,5 @@ def test_password():
...
@@ -35,5 +35,5 @@ def test_password():
def
test_header
():
def
test_header
():
return_test
=
config
.
get
(
"header_require"
,
"lgw
_header
"
)
return_test
=
config
.
get
(
"header_require"
,
"lgw
-b
"
)
return
json
.
loads
(
return_test
)
return
json
.
loads
(
return_test
)
src/pageobject/basepage.py
View file @
42699799
...
@@ -150,23 +150,29 @@ class Page(object):
...
@@ -150,23 +150,29 @@ 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
)
env
=
readConfig
.
get_env
()
# env = readConfig.get_env()
login_page
.
get_env_window
()
# login_page.get_env_window()
login_page
.
click_text
(
env
)
# login_page.click_what('span', 'text()', self.env)
login_page
.
excute_script
(
"form xm_phone_login"
)
# login_page.click_close_env_window()
login_page
.
sleep
(
2
)
# login_page.click_text(env)
# 执行脚本,隐藏的手机号码输入框弹出
# 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
)
login_page
.
sleep
(
2
)
login_page
.
click_text
(
"取 消"
)
login_page
.
sleep
(
3
)
# 鼠标键盘操作
# 鼠标键盘操作
# 拖拽元素,从sourse元素开始拖拽(x,y)像素
# 拖拽元素,从sourse元素开始拖拽(x,y)像素
...
...
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