manage-client 3.2.293 → 3.2.294
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AutoTest/BasePage.py +42 -0
- package/AutoTest/Config.json +2 -0
- package/AutoTest/PublicScript.py +447 -0
- package/AutoTest/README.md +12 -0
- package/AutoTest/__init__.py +0 -0
- package/AutoTest/all_case/__init__.py +0 -0
- package/AutoTest/all_case/search/__init__.py +0 -0
- package/AutoTest/all_case/search/as_ArchivesQueryScript2.py +155 -0
- package/AutoTest/all_case/search/as_AuditQueryScript2.py +113 -0
- package/AutoTest/all_case/search/as_Chargequery2.py +96 -0
- package/AutoTest/all_case/search/as_FinancialQueryScript2.py +142 -0
- package/AutoTest/all_case/search/as_Security_check3.py +99 -0
- package/AutoTest/all_case/search/as_ServiceQueryScript2.py +547 -0
- package/AutoTest/all_case/search/as_SummaryQueryScript2.py +77 -0
- package/AutoTest/all_case/search/as_Wechatmanage2.py +121 -0
- package/AutoTest/all_case/search/as_Writemetersearch2.py +114 -0
- package/AutoTest/report//346/237/245/350/257/242/351/203/250/345/210/206/346/265/213/350/257/225/346/212/245/345/221/212.html +7322 -0
- package/AutoTest/requirements.txt +9 -0
- package/AutoTest/search_test_run.py +24 -0
- package/package.json +1 -1
- package/src/filiale/shanxian/AreaGeneralQuery.vue +30 -0
- package/src/filiale/shanxian/RecordInfoQuery.vue +1 -1
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
from BeautifulReport import BeautifulReport
|
|
2
|
+
from PublicScript import *
|
|
3
|
+
from BasePage import basepage
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class as_Wechatmanage2(basepage):
|
|
7
|
+
def save_img(self, img_name):
|
|
8
|
+
self.driver.get_screenshot_as_file("./img/" + img_name + ".png")
|
|
9
|
+
|
|
10
|
+
@classmethod
|
|
11
|
+
def setUpClass(cls):
|
|
12
|
+
cls.set_driver()
|
|
13
|
+
|
|
14
|
+
@BeautifulReport.add_test_img("test_Ayyzxquery")
|
|
15
|
+
def test_Ayyzxquery(self):
|
|
16
|
+
"""填写所有内容后进行预约中心查询"""
|
|
17
|
+
global driver
|
|
18
|
+
driver = self.get_driver()
|
|
19
|
+
id_click(driver, '微信管理')
|
|
20
|
+
id_click(driver, '预约中心')
|
|
21
|
+
bottom_push_click(driver)
|
|
22
|
+
self.public_ctrl(driver)
|
|
23
|
+
|
|
24
|
+
@BeautifulReport.add_test_img("test_Bwzglquery")
|
|
25
|
+
def test_Bwzglquery(self):
|
|
26
|
+
"""填写所有内容后进行文章管理查询"""
|
|
27
|
+
close_current_page(driver)
|
|
28
|
+
id_click(driver, '文章管理')
|
|
29
|
+
bottom_push_click(driver)
|
|
30
|
+
self.public_ctrl(driver)
|
|
31
|
+
|
|
32
|
+
@BeautifulReport.add_test_img("test_Cwxjbquery")
|
|
33
|
+
def test_Cwxjbquery(self):
|
|
34
|
+
"""填写所有内容后进行微信解绑查询"""
|
|
35
|
+
close_current_page(driver)
|
|
36
|
+
id_click(driver, '微信解绑')
|
|
37
|
+
bottom_push_click(driver)
|
|
38
|
+
self.public_ctrl(driver)
|
|
39
|
+
|
|
40
|
+
@BeautifulReport.add_test_img("test_EAwxshglquery")
|
|
41
|
+
def test_EAwxshglquery(self):
|
|
42
|
+
"""填写所有内容后进行微信商户管理查询"""
|
|
43
|
+
close_current_page(driver)
|
|
44
|
+
id_click(driver, '微信参数管理')
|
|
45
|
+
target_list = find_li(driver)
|
|
46
|
+
if '微信商户管理' not in target_list:
|
|
47
|
+
print('当前页面不存在此测试项')
|
|
48
|
+
self.assertEqual(1, 1)
|
|
49
|
+
else:
|
|
50
|
+
present_wait(driver, By.XPATH, '//button[text()="微信商户管理"]').click()
|
|
51
|
+
self.public_ctrl(driver)
|
|
52
|
+
|
|
53
|
+
@BeautifulReport.add_test_img("test_EBwxcsglquery")
|
|
54
|
+
def test_EBwxcsglquery(self):
|
|
55
|
+
"""填写所有内容后进行微信参数管理查询"""
|
|
56
|
+
close_current_page(driver)
|
|
57
|
+
id_click(driver, '微信参数管理')
|
|
58
|
+
target_list = find_li(driver)
|
|
59
|
+
if '微信参数管理' not in target_list:
|
|
60
|
+
print('当前页面不存在此测试项')
|
|
61
|
+
self.assertEqual(1, 1)
|
|
62
|
+
else:
|
|
63
|
+
present_wait(driver, By.XPATH, '//button[text()="微信参数管理"]').click()
|
|
64
|
+
self.public_ctrl(driver)
|
|
65
|
+
|
|
66
|
+
@BeautifulReport.add_test_img("test_FAqftsquery")
|
|
67
|
+
def test_FAqftsquery(self):
|
|
68
|
+
"""填写所有内容后进行欠费推送查询"""
|
|
69
|
+
close_current_page(driver)
|
|
70
|
+
id_click(driver, '模板消息推送')
|
|
71
|
+
target_list = find_li(driver)
|
|
72
|
+
if '欠费推送' not in target_list:
|
|
73
|
+
print('当前页面不存在此测试项')
|
|
74
|
+
self.assertEqual(1, 1)
|
|
75
|
+
else:
|
|
76
|
+
present_wait(driver, By.XPATH, '//button[text()="欠费推送"]').click()
|
|
77
|
+
self.myself_ctrl()
|
|
78
|
+
self.public_ctrl(driver)
|
|
79
|
+
|
|
80
|
+
@BeautifulReport.add_test_img("test_Gqssfquery")
|
|
81
|
+
def test_Gqssfquery(self):
|
|
82
|
+
"""填写所有内容后进行停气公告查询"""
|
|
83
|
+
close_current_page(driver)
|
|
84
|
+
id_click(driver, '停气公告')
|
|
85
|
+
bottom_push_click(driver)
|
|
86
|
+
self.public_ctrl(driver)
|
|
87
|
+
|
|
88
|
+
def test_zZZZ_END(self):
|
|
89
|
+
"""当前测试模块结束,关闭浏览器"""
|
|
90
|
+
driver.quit()
|
|
91
|
+
|
|
92
|
+
def public_ctrl(self, driver):
|
|
93
|
+
sleep(2)
|
|
94
|
+
# 输入框
|
|
95
|
+
input_border(driver, '//div[@class="col-sm-4 form-group"]/input')
|
|
96
|
+
# 选择框
|
|
97
|
+
choose_border(driver, '//div[@class="btn-group"]')
|
|
98
|
+
# 选择小区
|
|
99
|
+
area_choose(driver)
|
|
100
|
+
# 日期框
|
|
101
|
+
data_border(driver, '//div[@class="datepicker"]')
|
|
102
|
+
search_buttons = present_waits(driver, By.XPATH, '//button[text()="查询"]')
|
|
103
|
+
for search_button in search_buttons:
|
|
104
|
+
if search_button.is_displayed():
|
|
105
|
+
search_button.click()
|
|
106
|
+
break
|
|
107
|
+
result = is_element_load(driver, '//p[contains(text(),"错误码")]')
|
|
108
|
+
expect = '测试'
|
|
109
|
+
if not result:
|
|
110
|
+
print(' 查询功能未报错,测试通过 ')
|
|
111
|
+
expect = '查询功能未报错,测试通过'
|
|
112
|
+
else:
|
|
113
|
+
print(' 查询功能报错,测试失败 ')
|
|
114
|
+
self.assertEqual(expect, '查询功能未报错,测试通过')
|
|
115
|
+
|
|
116
|
+
def myself_ctrl(self):
|
|
117
|
+
present_wait(driver, By.XPATH, '//div[@class="binary-right"]//'
|
|
118
|
+
'div[@class="button_spacing button_shrink_bottom"]').click()
|
|
119
|
+
|
|
120
|
+
def tearDown(self):
|
|
121
|
+
pass
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
from PublicScript import *
|
|
2
|
+
from BasePage import basepage
|
|
3
|
+
from BeautifulReport import BeautifulReport
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class as_Writemetersearch2(basepage):
|
|
7
|
+
def save_img(self, img_name):
|
|
8
|
+
self.driver.get_screenshot_as_file("./img/" + img_name + ".png")
|
|
9
|
+
|
|
10
|
+
@classmethod
|
|
11
|
+
def setUpClass(cls):
|
|
12
|
+
cls.set_driver()
|
|
13
|
+
|
|
14
|
+
@BeautifulReport.add_test_img("test_AAkhquery")
|
|
15
|
+
def test_AAkhquery(self):
|
|
16
|
+
"""填写所有内容后进行计划下发查询"""
|
|
17
|
+
global driver
|
|
18
|
+
driver = self.get_driver()
|
|
19
|
+
id_click(driver, "抄表管理")
|
|
20
|
+
id_click(driver, "机表抄表")
|
|
21
|
+
target_list = find_li(driver)
|
|
22
|
+
if '计划下发' not in target_list:
|
|
23
|
+
print('当前页面不存在此测试项')
|
|
24
|
+
self.assertEqual(1, 1)
|
|
25
|
+
else:
|
|
26
|
+
self.click_topbutton(driver, '计划下发')
|
|
27
|
+
self.public_ctrl(driver)
|
|
28
|
+
|
|
29
|
+
@BeautifulReport.add_test_img("test_Bquery")
|
|
30
|
+
def test_Bquery(self):
|
|
31
|
+
"""填写所有内容后进行机表抄表查询"""
|
|
32
|
+
present_wait(driver, By.ID, "vc-tree-name-机表抄表").click()
|
|
33
|
+
target_list = find_li(driver)
|
|
34
|
+
if '机表抄表' not in target_list:
|
|
35
|
+
print('当前页面不存在此测试项')
|
|
36
|
+
self.assertEqual(1, 1)
|
|
37
|
+
else:
|
|
38
|
+
self.click_topbutton(driver, '机表抄表')
|
|
39
|
+
self.public_ctrl(driver)
|
|
40
|
+
|
|
41
|
+
@BeautifulReport.add_test_img("test_Cquery")
|
|
42
|
+
def test_Cquery(self):
|
|
43
|
+
"""填写所有内容后进行抄表审核查询"""
|
|
44
|
+
present_wait(driver, By.ID, "vc-tree-name-机表抄表").click()
|
|
45
|
+
target_list = find_li(driver)
|
|
46
|
+
if '抄表审核' not in target_list:
|
|
47
|
+
print('当前页面不存在此测试项')
|
|
48
|
+
self.assertEqual(1, 1)
|
|
49
|
+
else:
|
|
50
|
+
self.click_topbutton(driver, '抄表审核')
|
|
51
|
+
self.public_ctrl(driver)
|
|
52
|
+
|
|
53
|
+
@BeautifulReport.add_test_img("test_Dquery")
|
|
54
|
+
def test_Dquery(self):
|
|
55
|
+
"""填写所有内容后进行抄表查询"""
|
|
56
|
+
present_wait(driver, By.ID, "vc-tree-name-机表抄表").click()
|
|
57
|
+
target_list = find_li(driver)
|
|
58
|
+
if '抄表查询' not in target_list:
|
|
59
|
+
print('当前页面不存在此测试项')
|
|
60
|
+
self.assertEqual(1, 1)
|
|
61
|
+
else:
|
|
62
|
+
self.click_topbutton(driver, '抄表查询')
|
|
63
|
+
self.public_ctrl(driver)
|
|
64
|
+
|
|
65
|
+
@BeautifulReport.add_test_img("test_Equery")
|
|
66
|
+
def test_Equery(self):
|
|
67
|
+
"""填写所有内容后进行欠费查询"""
|
|
68
|
+
present_wait(driver, By.ID, "vc-tree-name-机表抄表").click()
|
|
69
|
+
target_list = find_li(driver)
|
|
70
|
+
if '欠费查询' not in target_list:
|
|
71
|
+
print('当前页面不存在此测试项')
|
|
72
|
+
self.assertEqual(1, 1)
|
|
73
|
+
else:
|
|
74
|
+
self.click_topbutton(driver, '欠费查询')
|
|
75
|
+
self.public_ctrl(driver)
|
|
76
|
+
|
|
77
|
+
def test_zZZZ_END(self):
|
|
78
|
+
"""当前测试模块结束,关闭浏览器"""
|
|
79
|
+
driver.quit()
|
|
80
|
+
|
|
81
|
+
def click_topbutton(self, driver, but_name):
|
|
82
|
+
topbuttons = present_waits(driver, By.XPATH, '//ul[@role="tablist"]//button')
|
|
83
|
+
for topbutton in topbuttons:
|
|
84
|
+
if topbutton.text == but_name:
|
|
85
|
+
topbutton.click()
|
|
86
|
+
break
|
|
87
|
+
|
|
88
|
+
def public_ctrl(self, driver):
|
|
89
|
+
sleep(2)
|
|
90
|
+
# 输入框
|
|
91
|
+
input_border(driver, '//div[@class="col-sm-2 form-group"]/input')
|
|
92
|
+
# 选择框
|
|
93
|
+
choose_border(driver, '//div[@class="btn-group"]')
|
|
94
|
+
# 选择小区
|
|
95
|
+
area_choose(driver)
|
|
96
|
+
# 日期框
|
|
97
|
+
data_border(driver, '//div[@class="datepicker"]')
|
|
98
|
+
|
|
99
|
+
search_buttons = present_waits(driver, By.XPATH, '//button[text()="查询"]')
|
|
100
|
+
for search_button in search_buttons:
|
|
101
|
+
if search_button.is_displayed():
|
|
102
|
+
search_button.click()
|
|
103
|
+
break
|
|
104
|
+
result = is_element_load(driver, '//p[contains(text(),"错误码")]')
|
|
105
|
+
expect = '测试'
|
|
106
|
+
if not result:
|
|
107
|
+
print(' 查询功能未报错,测试通过 ')
|
|
108
|
+
expect = '查询功能未报错,测试通过'
|
|
109
|
+
else:
|
|
110
|
+
print(' 查询功能报错,测试失败 ')
|
|
111
|
+
self.assertEqual(expect, '查询功能未报错,测试通过')
|
|
112
|
+
|
|
113
|
+
def tearDown(self):
|
|
114
|
+
pass
|