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
d173d6f7
Commit
d173d6f7
authored
Jul 01, 2025
by
之约
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
eeabd6b3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
134 additions
and
149 deletions
+134
-149
AIDigitalcreationPaga.py
paga/AIDigitalcreationPaga.py
+119
-113
AISelectedtopicPaga.py
paga/AISelectedtopicPaga.py
+4
-4
AITopicplanningPaga.py
paga/AITopicplanningPaga.py
+0
-8
AiNewmediaeditorPage.py
paga/AiNewmediaeditorPage.py
+3
-16
test_AISelectedtopic.py
script/test_AISelectedtopic.py
+1
-1
test_AiNewmediaeditor.py
script/test_AiNewmediaeditor.py
+7
-7
No files found.
paga/AIDigitalcreationPaga.py
View file @
d173d6f7
import
time
from
selenium.webdriver.common.by
import
By
from
Base.BasePage
import
BasePage
from
common.DButils
import
DButils
from
common.untils
import
DriverTools
from
paga.AIEditingRoomPage
import
AIER
from
paga.LoginPage
import
Login
from
common.cutils
import
ws_error
from
config
import
Aiperiodicals_text
# AI数字创作编辑
class
AIDigitalcreation
(
BasePage
):
def
__init__
(
self
):
super
()
.
__init__
(
'web'
)
# 更多按钮
self
.
more_btn
=
(
By
.
XPATH
,
"(//div[@class='button-list-item more-btn hover-bg-color hover-text-color'])[1]"
)
# 制作教辅课件类PPT按钮
self
.
ppt_btn
=
(
By
.
XPATH
,
"(//div[@class='name'][contains(text(),'制作教辅课件类PPT')])[2]"
)
# 示例按钮
self
.
example_btn
=
(
By
.
XPATH
,
"(//div[@id='exampleButton'])[1]"
)
# 发送按钮
self
.
send_file
=
(
By
.
XPATH
,
"//button[contains(text(),'发送')]"
)
# 点击PPT确认内容按钮
self
.
content_btn
=
(
By
.
XPATH
,
"(//div[@class='fileName'])[1]"
)
# 生成PPT按钮
self
.
generatePPT_btn
=
(
By
.
XPATH
,
"(//button[@type='button'])[1]"
)
# 现代纸书一键制作与资源配置按钮
self
.
modern_btn
=
(
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]"
)
# 书刊名称输入框
self
.
periodicals_input
=
(
By
.
XPATH
,
"(//input[@placeholder='请输入书刊名称'])[1]"
)
# 点击查询按钮
self
.
inquire_btn
=
(
By
.
XPATH
,
"(//span[contains(text(),'点击查询')])[1]"
)
# 点击配置资源按钮
self
.
natural_btn
=
(
By
.
XPATH
,
"(//label[@class='ant-checkbox-wrapper ant-checkbox-group-item'])[1]"
)
# 点击一键制作按钮
self
.
make_btn
=
(
By
.
XPATH
,
"(//button[@class='ant-btn ant-btn-primary'])[1]"
)
# 点击提供资源选题方案灵感按钮
self
.
scheme_btn
=
(
By
.
XPATH
,
"(//div[@class='name'][contains(text(),'提供资源选题方案灵感')])[2]"
)
# 点击书刊分类-K12中小学教辅按钮
self
.
periodicals_btn
=
(
By
.
XPATH
,
"(//div[@class='ant-cascader-menu-item-content'][contains(text(),'K12中小学教辅')])[1]"
)
# 点击书刊分类-幼小衔接按钮
self
.
school_btn
=
(
By
.
XPATH
,
"(//div[@class='ant-cascader-menu-item-content'][contains(text(),'幼小衔接')])[1]"
)
# 点击书刊分类-语文按钮
self
.
chinese_btn
=
(
By
.
XPATH
,
"(//div[@class='ant-cascader-menu-item-content'][contains(text(),'语文')])[1]"
)
# 点击确定按钮
self
.
sure_btn
=
(
By
.
XPATH
,
"(//span[contains(text(),'确定')])[1]"
)
# 点击制作浓缩书配音按钮
self
.
concentratedbook_btn
=
(
By
.
XPATH
,
"(//div[@class='name'][contains(text(),'制作浓缩书配音')])[2]"
)
# 制作教辅课件类PPT
def
ai_ppt
(
self
):
self
.
find_ele
(
self
.
more_btn
)
.
click
()
time
.
sleep
(
5
)
self
.
find_ele
(
self
.
ppt_btn
)
.
click
()
time
.
sleep
(
5
)
self
.
find_ele
(
self
.
example_btn
)
.
click
()
time
.
sleep
(
5
)
self
.
find_ele
(
self
.
send_file
)
.
click
()
time
.
sleep
(
30
)
self
.
find_ele
(
self
.
content_btn
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
generatePPT_btn
)
.
click
()
# 现代纸书一键制作
def
modern_paper_book
(
self
,
txt
):
self
.
find_ele
(
self
.
more_btn
)
.
click
()
time
.
sleep
(
5
)
self
.
find_ele
(
self
.
modern_btn
)
.
click
()
time
.
sleep
(
5
)
self
.
find_ele
(
self
.
periodicals_input
)
.
send_keys
(
txt
)
time
.
sleep
(
5
)
self
.
find_ele
(
self
.
inquire_btn
)
.
click
()
time
.
sleep
(
5
)
self
.
find_ele
(
self
.
natural_btn
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
make_btn
)
.
click
()
# 提供资源选题方案灵感
def
ai_scheme
(
self
):
self
.
find_ele
(
self
.
more_btn
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
scheme_btn
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
periodicals_btn
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
school_btn
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
chinese_btn
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
sure_btn
)
.
click
()
time
.
sleep
(
3
)
# 制作浓缩书配音
def
ai_concentratedbook
(
self
):
self
.
find_ele
(
self
.
more_btn
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
concentratedbook_btn
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
example_btn
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
send_file
)
.
click
()
time
.
sleep
(
3
)
# import time
# from selenium.webdriver.common.by import By
# from Base.BasePage import BasePage
# from common.DButils import DButils
# from common.untils import DriverTools
# from paga.AIEditingRoomPage import AIER
# from paga.LoginPage import Login
# from common.cutils import ws_error
# from config import Aiperiodicals_text
#
#
#
# # AI数字创作编辑
# class AIDigitalcreation(BasePage):
# def __init__(self):
# super().__init__('web')
# # 更多按钮
# self.more_btn = (By.XPATH, "(//div[@class='button-list-item more-btn hover-bg-color hover-text-color'])[1]")
# # 制作教辅课件类PPT按钮
# self.ppt_btn = (By.XPATH, "(//div[@class='name'][contains(text(),'制作教辅课件类PPT')])[2]")
# # 示例按钮
# self.example_btn = (By.XPATH, "(//div[@id='exampleButton'])[1]")
# # 发送按钮
# self.send_file = (By.XPATH, "(//button[contains(text(),'发送')])[1]")
# # 点击PPT确认内容按钮
# self.content_btn = (By.XPATH, "(//div[@class='fileName'])[1]")
# # 生成PPT按钮
# self.generatePPT_btn=(By.XPATH,"(//button[@type='button'])[1]")
# # 现代纸书一键制作与资源配置按钮
# self.modern_btn = (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]")
# # 书刊名称输入框
# self.periodicals_input = (By.XPATH, "(//input[@placeholder='请输入书刊名称'])[1]")
# # 点击查询按钮
# self.inquire_btn = (By.XPATH, "(//span[contains(text(),'点击查询')])[1]")
# # 点击配置资源按钮
# self.natural_btn = (By.XPATH, "(//label[@class='ant-checkbox-wrapper ant-checkbox-group-item'])[1]")
# # 点击一键制作按钮
# self.make_btn = (By.XPATH, "(//button[@class='ant-btn ant-btn-primary'])[1]")
# # 点击提供资源选题方案灵感按钮
# self.scheme_btn = (By.XPATH, "(//div[@class='name'][contains(text(),'提供资源选题方案灵感')])[2]")
# # 点击书刊分类-K12中小学教辅按钮
# self.periodicals_btn = (By.XPATH, "(//div[@class='ant-cascader-menu-item-content'][contains(text(),'K12中小学教辅')])[1]")
# # 点击书刊分类-幼小衔接按钮
# self.school_btn = (By.XPATH, "(//div[@class='ant-cascader-menu-item-content'][contains(text(),'幼小衔接')])[1]")
# # 点击书刊分类-语文按钮
# self.chinese_btn = (By.XPATH, "(//div[@class='ant-cascader-menu-item-content'][contains(text(),'语文')])[1]")
# # 点击确定按钮
# self.sure_btn = (By.XPATH, "(//span[contains(text(),'确定')])[1]")
# # 点击制作浓缩书配音按钮
# self.concentratedbook_btn = (By.XPATH, "(//div[@class='name'][contains(text(),'制作浓缩书配音')])[2]")
#
#
#
# # 制作教辅课件类PPT
# def ai_ppt(self):
# self.find_ele(self.more_btn).click()
# time.sleep(5)
# self.find_ele(self.ppt_btn).click()
# time.sleep(5)
# self.find_ele(self.example_btn).click()
# time.sleep(5)
# self.find_ele(self.send_file).click()
# time.sleep(30)
# self.find_ele(self.content_btn).click()
# time.sleep(3)
# self.find_ele(self.generatePPT_btn).click()
#
#
# # 现代纸书一键制作
# def modern_paper_book(self,txt):
# self.find_ele(self.more_btn).click()
# time.sleep(5)
# self.find_ele(self.modern_btn).click()
# time.sleep(5)
# self.find_ele(self.periodicals_input).send_keys(txt)
# time.sleep(5)
# self.find_ele(self.inquire_btn).click()
# time.sleep(5)
# self.find_ele(self.natural_btn).click()
# time.sleep(3)
# self.find_ele(self.make_btn).click()
#
# # 提供资源选题方案灵感
# def ai_scheme(self):
# self.find_ele(self.more_btn).click()
# time.sleep(3)
# self.find_ele(self.scheme_btn).click()
# time.sleep(3)
# self.find_ele(self.periodicals_btn).click()
# time.sleep(3)
# self.find_ele(self.school_btn).click()
# time.sleep(3)
# self.find_ele(self.chinese_btn).click()
# time.sleep(3)
# self.find_ele(self.sure_btn).click()
# time.sleep(3)
#
# # 制作浓缩书配音
# def ai_concentratedbook(self):
# self.find_ele(self.more_btn).click()
# time.sleep(3)
# self.find_ele(self.concentratedbook_btn).click()
# time.sleep(3)
# self.find_ele(self.example_btn).click()
# time.sleep(3)
# self.find_ele(self.send_file).click()
# time.sleep(3)
#
#
#
# if __name__ == '__main__':
# driver = DriverTools.get_driver().get("https://aistudio.5rs.me/")
# Login().login("17671436261", "Xf123456")
# AIER().to_AI_Digitalcreation()
# AIDigitalcreation().ai_concentratedbook()
# time.sleep(10)
# DriverTools.quit_driver()
#
#
paga/AISelectedtopicPaga.py
View file @
d173d6f7
...
...
@@ -16,12 +16,12 @@ class AISelectedtopic(BasePage):
super
()
.
__init__
(
'web'
)
# 选题资讯-解读当前资讯按钮
self
.
information_btn
=
(
By
.
XPATH
,
"(//span[contains(text(),'解读当前资讯')])[1]"
)
#
了解选题新鲜事
按钮
self
.
freshnews_btn
=
(
By
.
XPATH
,
"(//div[
contains(@class,'name')][contains(text(),'了解选题新鲜事')
])[1]"
)
#
匹配热点话题
按钮
self
.
freshnews_btn
=
(
By
.
XPATH
,
"(//div[
@class='name'
])[1]"
)
# 示例按钮
self
.
example_btn
=
(
By
.
XPATH
,
"(//div[@id='exampleButton'])[1]"
)
# 发送按钮
self
.
send_file
=
(
By
.
XPATH
,
"
//button[contains(text(),'发送')
]"
)
self
.
send_file
=
(
By
.
XPATH
,
"
(//i[@class='ic ic-icon-send'])[1
]"
)
# 图书榜单按钮
self
.
bookrankings_file
=
(
By
.
XPATH
,
"(//div[@id='rc-tabs-0-tab-bookRank'])[1]"
)
# 解读图书榜单按钮
...
...
@@ -33,7 +33,7 @@ class AISelectedtopic(BasePage):
self
.
find_ele
(
self
.
information_btn
)
.
click
()
time
.
sleep
(
3
)
# 选题资讯-
了解选题新鲜事
# 选题资讯-
匹配热点话题
def
ai_freshnews
(
self
):
self
.
find_ele
(
self
.
freshnews_btn
)
.
click
()
time
.
sleep
(
5
)
...
...
paga/AITopicplanningPaga.py
View file @
d173d6f7
...
...
@@ -67,10 +67,3 @@ class AITopicplanning(BasePage):
# if __name__ == '__main__':
# driver = DriverTools.get_driver().get("https://aistudio.5rs.me/")
# Login().login("17671436261", "Xf123456")
# AIER().to_AI_Topicplanning()
# AITopicplanning().ai_booktitle()
# time.sleep(3)
# DriverTools.quit_driver()
\ No newline at end of file
paga/AiNewmediaeditorPage.py
View file @
d173d6f7
...
...
@@ -17,11 +17,11 @@ class AiNewmediaeditor(BasePage):
# 更多按钮
self
.
more_btn
=
(
By
.
XPATH
,
"(//div[@class='button-list-item more-btn hover-bg-color hover-text-color'])[1]"
)
# 微博图书推文按钮
self
.
Weibo_book
=
(
By
.
XPATH
,
"
//div[@class='button-typ-item']//div[@class='name'][contains(text(),'微博图书推文')
]"
)
self
.
Weibo_book
=
(
By
.
XPATH
,
"
(//div[@class='name'][contains(text(),'微博图书推文')])[2
]"
)
# 示例按钮
self
.
example_btn
=
(
By
.
XPATH
,
"(//div[@id='exampleButton'])[1]"
)
# 发送按钮
self
.
send_file
=
(
By
.
XPATH
,
"
//button[contains(text(),'发送')
]"
)
self
.
send_file
=
(
By
.
XPATH
,
"
(//button[contains(text(),'发送')])[1
]"
)
# 上传书稿按钮
self
.
update_btn
=
(
By
.
XPATH
,
"(//span[contains(text(),'上传书稿')])[1]"
)
# 直播间口播稿按钮
...
...
@@ -44,20 +44,7 @@ class AiNewmediaeditor(BasePage):
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
send_file
)
.
click
()
# 上传直播间口播稿
def
update_ai_broadcasting
(
self
,
text
,
updata_path
):
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
more_btn
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
broadcasting_btn
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
title_input
)
.
send_keys
(
text
)
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
update_btn
)
.
click
()
time
.
sleep
(
3
)
self
.
find_ele
(
self
.
update_file
)
.
send_keys
(
updata_path
)
time
.
sleep
(
5
)
self
.
find_ele
(
self
.
send_file
)
.
click
()
script/test_AISelectedtopic.py
View file @
d173d6f7
...
...
@@ -37,7 +37,7 @@ class TestaiSelectedtopic:
time
.
sleep
(
3
)
# AI选题情报员-选题资讯-了解选题新鲜事
@allure.feature
(
"
了解选题新鲜事流程
"
)
@allure.feature
(
"
匹配热点话题
"
)
def
test_ai_freshnews
(
self
):
self
.
aiselectedtopic
.
ai_freshnews
()
time
.
sleep
(
20
)
...
...
script/test_AiNewmediaeditor.py
View file @
d173d6f7
...
...
@@ -34,13 +34,13 @@ class TestAiNewmediaeditor:
self
.
ainewmediaeditorPage
.
ai_Weibo
()
time
.
sleep
(
30
)
# AI新媒体编辑-上传直播间口播稿
@allure.feature
(
"上传直播间口播稿流程"
)
def
test_find_broadcasting
(
self
):
self
.
ainewmediaeditorPage
.
update_ai_broadcasting
(
AiNewmediae_text
,
updata_AiNewmediae_path
)
time
.
sleep
(
50
)
ws_error
(
2
)
time
.
sleep
(
3
)
#
#
AI新媒体编辑-上传直播间口播稿
#
@allure.feature("上传直播间口播稿流程")
#
def test_find_broadcasting(self):
#
self.ainewmediaeditorPage.update_ai_broadcasting(AiNewmediae_text,updata_AiNewmediae_path)
#
time.sleep(50)
#
ws_error(2)
#
time.sleep(3)
...
...
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