Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
selenium
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
谢非
selenium
Commits
008dc794
Commit
008dc794
authored
Feb 19, 2024
by
1161899172@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改名称相关问题
parent
b79dfbe9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
20 deletions
+103
-20
config.py
config.py
+2
-2
DigitalEmployeesPage.py
paga/DigitalEmployeesPage.py
+80
-13
test_Digital_Employees.py
script/test_Digital_Employees.py
+21
-5
No files found.
config.py
View file @
008dc794
...
...
@@ -13,5 +13,5 @@ caps = {
}
appium_server_url
=
"http://127.0.0.1:4723/wd/hub"
user_name
=
"
17671436266
"
password
=
"
Xf123456
"
user_name
=
"
黑泽爽子
"
password
=
"
Rmb88888
"
paga/DigitalEmployeesPage.py
View file @
008dc794
...
...
@@ -15,7 +15,7 @@ class DEA(BasePage):
super
()
.
__init__
(
'web'
)
# 数字编辑助理
self
.
Digital_editorial_assistant
=
(
By
.
XPATH
,
"
/html[1]/body[1]/div[1]/div[1]/section[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[6]/div[1]/div[1]/div
[1]"
)
"
(//div[@class='studio-name'][contains(text(),'数字编辑助理')])
[1]"
)
# 更多
self
.
More
=
(
By
.
XPATH
,
"//div[@class='button-list-item more-btn']"
)
# 数字编辑助理-制作英语听力配音
...
...
@@ -27,13 +27,13 @@ class DEA(BasePage):
self
.
send
=
(
By
.
XPATH
,
"//button[@class='send-button']"
)
# 数字编辑助理-推送英语配音
self
.
Make_dubbing
=
(
By
.
XPATH
,
"
/html[1]/body[1]/div[1]/div[1]/section[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/div[1]/div[11]/div[1]/div[1]/div[2]/div[2]/div[1]/div[2]/div[1]/button[1]/span[1
]"
)
"
(//span[contains(text(),'制作英语听力')])[2
]"
)
# 数字编辑助理-制作多角色配音
self
.
Make_multi_character_voice_overs
=
(
By
.
XPATH
,
"//div[@class='button-type-list']//div[1]//div[2]//div[2]//div[1]//div[1]"
)
# 数字编辑助理-推送多角色配音
self
.
multi_role
=
(
By
.
XPATH
,
"
/html[1]/body[1]/div[1]/div[1]/section[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/div[1]/div[11]/div[1]/div[1]/div[2]/div[2]/div[1]/div[2]/div[1]/button[1]/span
[1]"
)
"
(//span[contains(text(),'制作配音')])
[1]"
)
# 数字编辑助理-现代纸书一键制作
self
.
Modern_paper_book_one_key_production_resource_allocation
=
(
By
.
XPATH
,
"//div[contains(@class,'ant-popover button-list-more-popover ant-popover-placement-topRight')]//div[2]//div[2]//div[1]//div[1]//div[1]"
)
...
...
@@ -51,11 +51,32 @@ class DEA(BasePage):
self
.
Home_page
=
(
By
.
XPATH
,
"//span[@class='clickable']"
)
# AI编辑工作室返回RAYS现代纸书首页
self
.
Home_page01
=
(
By
.
XPATH
,
"//div[@class='system-title']"
)
# 数字编辑助理-一键制作-去调整
self
.
To_adjust
=
(
By
.
XPATH
,
"(//span[contains(text(),'去调整')])[2]"
)
# 数字编辑助理-推送一键制作
self
.
Modern_paper_book
=
(
By
.
XPATH
,
"//span[contains(text(),'制作现代纸书')]"
)
# 数字编辑助理-提供资源选题方案灵感
self
.
Provide_inspiration_for_resource_selection_schemes
=
(
By
.
XPATH
,
"//div[contains(@class,'ant-popover button-list-more-popover ant-popover-placement-topRight')]//div[3]//div[2]//div[1]//div[1]//div[1]"
)
# 数字编辑助理-提供资源选题方案灵感-书刊分类-K12中小学教辅
self
.
Classification
=
(
By
.
XPATH
,
"//div[contains(text(),'K12')]"
)
# 数字编辑助理-提供资源选题方案灵感-书刊分类-幼小衔接
self
.
Classification01
=
(
By
.
XPATH
,
"//li[@title='幼小衔接']//div[1]"
)
# 数字编辑助理-提供资源选题方案灵感-书刊分类-语文
self
.
Classification02
=
(
By
.
XPATH
,
"//li[@title='语文']//div[1]"
)
#数字编辑助理 - 制作英语听力配音
#AI编辑室返回AI编辑工作室首页
def
Back
(
self
):
self
.
find_ele
(
self
.
Home_page
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
Home_page01
)
.
click
()
time
.
sleep
(
5
)
# 数字编辑助理 - 制作英语听力配音
def
meld
(
self
):
#
self.find_ele(self.Digital_editorial_assistant).click()
# time.sleep(1
)
self
.
find_ele
(
self
.
Digital_editorial_assistant
)
.
click
()
time
.
sleep
(
2
)
self
.
find_ele
(
self
.
More
)
.
click
()
time
.
sleep
(
2
)
self
.
find_ele
(
self
.
Make_English_listening_dubbing
)
.
click
()
...
...
@@ -67,8 +88,8 @@ class DEA(BasePage):
time
.
sleep
(
2
)
self
.
find_ele
(
self
.
send
)
.
click
()
time
.
sleep
(
6
)
#
a = get_text(self.Make_dubbing)
#
print(a)
a
=
get_text
(
self
.
Make_dubbing
)
print
(
a
)
self
.
find_ele
(
self
.
Make_dubbing
)
.
click
()
time
.
sleep
(
3
)
self
.
windows_change
(
-
1
)
...
...
@@ -88,13 +109,15 @@ class DEA(BasePage):
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
send
)
.
click
()
time
.
sleep
(
6
)
b
=
get_text
(
self
.
multi_role
)
print
(
b
)
self
.
find_ele
(
self
.
multi_role
)
.
click
()
time
.
sleep
(
3
)
self
.
windows_change
(
-
1
)
self
.
close_window
()
self
.
windows_change
(
-
1
)
#数字编辑助理 - 现代纸书一键制作
#数字编辑助理 - 现代纸书一键制作
-点击
def
mpbokpra
(
self
):
self
.
find_ele
(
self
.
More
)
.
click
()
time
.
sleep
(
3
)
...
...
@@ -110,10 +133,53 @@ class DEA(BasePage):
# time.sleep(1)
self
.
find_ele
(
self
.
click_fabrication
)
.
click
()
time
.
sleep
(
6
)
self
.
find_ele
(
self
.
Home_page
)
.
click
()
self
.
find_ele
(
self
.
To_adjust
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
Home_page01
)
.
click
()
time
.
sleep
(
5
)
self
.
windows_change
(
-
1
)
self
.
close_window
()
self
.
windows_change
(
-
1
)
# 数字编辑助理 - 现代纸书一键制作-输入
def
mpbokpra_input
(
self
):
self
.
find_ele
(
self
.
Input_field
)
.
send_keys
(
"现代纸书制作"
)
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
send
)
.
click
()
time
.
sleep
(
6
)
c
=
get_text
(
self
.
Modern_paper_book
)
print
(
c
)
self
.
find_ele
(
self
.
Modern_paper_book
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
Book_title
)
.
send_keys
(
"红楼梦"
)
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
Click_query
)
.
click
()
time
.
sleep
(
6
)
# self.find_ele(self.Audio_frequency).click()
# time.sleep(1)
# self.find_ele(self.Reader_circle).click()
# time.sleep(1)
self
.
find_ele
(
self
.
click_fabrication
)
.
click
()
time
.
sleep
(
6
)
self
.
find_ele
(
self
.
To_adjust
)
.
click
()
time
.
sleep
(
3
)
self
.
windows_change
(
-
1
)
self
.
close_window
()
self
.
windows_change
(
-
1
)
# 数字编辑助理 - 提供资源选题方案灵感
def
pifrss
(
self
):
self
.
find_ele
(
self
.
More
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
Provide_inspiration_for_resource_selection_schemes
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
Classification
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
Classification01
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
Classification02
)
.
click
()
time
.
sleep
(
6
)
...
...
@@ -122,6 +188,7 @@ if __name__ == '__main__':
Login
()
.
login
(
user_name
,
password
)
RAYSMPB
()
.
to_ai_studio
()
AIER
()
.
to_ai_room
()
DEA
()
.
mpbokpra
()
DEA
()
.
mpbokpra_input
()
# DEA().mmcvo()
Del
()
.
delete
()
DriverTools
.
quit_driver
()
script/test_Digital_Employees.py
View file @
008dc794
...
...
@@ -35,13 +35,29 @@ class TestCreate:
self
.
RAYSMPB
.
to_ai_studio
()
self
.
AIER
.
to_ai_room
()
self
.
DEA
.
meld
()
result1
=
get_text
(
self
.
DEA
.
Make_dubbing
)
expect1
=
"制作英语听力"
assert
expect1
==
result1
self
.
DEA
.
mmcvo
()
result2
=
get_text
(
self
.
DEA
.
multi_role
)
expect2
=
"制作配音"
assert
expect2
==
result2
self
.
DEA
.
mpbokpra
()
# result = get_text(self.DEA.Make_dubbing)
# expect = "制作英语听力"
# assert expect == result
# print(expect)
time
.
sleep
(
2
)
self
.
DEA
.
Back
()
self
.
delete
.
delete
()
self
.
RAYSMPB
.
to_ai_studio
()
self
.
AIER
.
to_ai_room
()
self
.
DEA
.
mpbokpra_input
()
time
.
sleep
(
3
)
result3
=
get_text
(
self
.
DEA
.
Modern_paper_book
)
expect3
=
"制作现代纸书"
assert
expect3
==
result3
self
.
DEA
.
Back
()
self
.
delete
.
delete
()
self
.
RAYSMPB
.
to_ai_studio
()
self
.
AIER
.
to_ai_room
()
self
.
DEA
.
pifrss
()
time
.
sleep
(
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