Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wsmonitor
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
宋鹏博
wsmonitor
Commits
5c129d96
Commit
5c129d96
authored
Jul 31, 2025
by
之约
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改登录元素
parent
086e4ce7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
LoginPage.py
paga/LoginPage.py
+12
-3
test_AIBookreview.py
script/test_AIBookreview.py
+5
-2
No files found.
paga/LoginPage.py
View file @
5c129d96
...
...
@@ -19,15 +19,23 @@ class Login(BasePage):
self
.
person_login
=
(
By
.
XPATH
,
"(//span[contains(text(),'登录')])[2]"
)
# 错误弹窗
self
.
login_info
=
(
By
.
XPATH
,
'/html/body/div[2]/div/div/div/div/div/span[2]'
)
#
勾选协议
self
.
Check_agreement
=
(
By
.
XPATH
,
"(//span[contains(text(),'我已阅读并同意')])[1
]"
)
#
同意隐私政策
self
.
agree_box
=
(
By
.
XPATH
,
"//span[@class='ant-checkbox']//input[@class='ant-checkbox-input'
]"
)
def
login
(
self
,
user
,
password
):
self
.
find_ele
(
self
.
reader_username
)
.
send_keys
(
user
)
time
.
sleep
(
1
)
self
.
find_ele
(
self
.
follow_password
)
.
send_keys
(
password
)
time
.
sleep
(
1
)
self
.
find_ele
(
self
.
Check_agreement
)
.
click
()
self
.
find_ele
(
self
.
person_login
)
.
click
()
time
.
sleep
(
1
)
def
login_first
(
self
,
user
,
password
):
self
.
find_ele
(
self
.
reader_username
)
.
send_keys
(
user
)
time
.
sleep
(
1
)
self
.
find_ele
(
self
.
follow_password
)
.
send_keys
(
password
)
time
.
sleep
(
1
)
self
.
find_ele
(
self
.
agree_box
)
.
click
()
time
.
sleep
(
1
)
self
.
find_ele
(
self
.
person_login
)
.
click
()
time
.
sleep
(
1
)
...
...
@@ -36,3 +44,4 @@ class Login(BasePage):
script/test_AIBookreview.py
View file @
5c129d96
...
...
@@ -21,8 +21,7 @@ class TestAIBookreview:
def
setup_method
(
self
):
self
.
driver
=
DriverTools
.
get_driver
()
.
get
(
login_url
)
self
.
login
.
login
(
user_name
,
password
)
self
.
AIroom
.
to_AI_Bookreview
()
# 类后置
def
teardown_class
(
self
):
...
...
@@ -31,12 +30,16 @@ class TestAIBookreview:
# AI书评编辑-文学书评
@allure.feature
(
"文学书评流程"
)
def
test_find_Literary
(
self
):
self
.
login
.
login_first
(
user_name
,
password
)
self
.
AIroom
.
to_AI_Bookreview
()
self
.
aibookreview
.
ai_Literary
()
time
.
sleep
(
60
)
# AI书评编辑-上传社科书评
@allure.feature
(
"上传社科书评流程"
)
def
test_find_AiNewmediae
(
self
):
self
.
login
.
login
(
user_name
,
password
)
self
.
AIroom
.
to_AI_Bookreview
()
self
.
aibookreview
.
update_social_btn
(
updata_AiNewmediae_path
)
time
.
sleep
(
100
)
ws_error
(
2
)
...
...
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