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,547 @@
|
|
|
1
|
+
from PublicScript import *
|
|
2
|
+
from BasePage import basepage
|
|
3
|
+
from BeautifulReport import BeautifulReport
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class as_ServiceQueryScript2(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_Akhquery")
|
|
15
|
+
def test_Akhquery(self):
|
|
16
|
+
"""填写所有内容后进行收费查询"""
|
|
17
|
+
global driver
|
|
18
|
+
driver = self.get_driver()
|
|
19
|
+
is_element_load(driver, '//*[@id="top"]/div/div[1]/h3')
|
|
20
|
+
present_wait(driver, By.ID, "vc-tree-name-综合查询").click()
|
|
21
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
22
|
+
target_list = find_li(driver)
|
|
23
|
+
if '收费查询' not in target_list:
|
|
24
|
+
print('当前页面不存在此测试项')
|
|
25
|
+
self.assertEqual(1, 1)
|
|
26
|
+
else:
|
|
27
|
+
self.click_topbutton(driver, '收费查询')
|
|
28
|
+
self.public_ctrl(driver)
|
|
29
|
+
|
|
30
|
+
@BeautifulReport.add_test_img("test_Bhbquery")
|
|
31
|
+
def test_Bhbquery(self):
|
|
32
|
+
"""填写所有内容后进行换表查询"""
|
|
33
|
+
close_current_page(driver)
|
|
34
|
+
sleep(0.5)
|
|
35
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
36
|
+
target_list = find_li(driver)
|
|
37
|
+
if '换表查询' not in target_list:
|
|
38
|
+
print('当前页面不存在此测试项')
|
|
39
|
+
self.assertEqual(1, 1)
|
|
40
|
+
else:
|
|
41
|
+
self.click_topbutton(driver, '换表查询')
|
|
42
|
+
self.public_ctrl(driver)
|
|
43
|
+
|
|
44
|
+
@BeautifulReport.add_test_img("test_Cjbcbquery")
|
|
45
|
+
def test_Cjbcbquery(self):
|
|
46
|
+
"""填写所有内容后进行机表抄表查询"""
|
|
47
|
+
close_current_page(driver)
|
|
48
|
+
sleep(0.5)
|
|
49
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
50
|
+
target_list = find_li(driver)
|
|
51
|
+
if '明细报表查询' not in target_list:
|
|
52
|
+
print('当前页面不存在此测试项')
|
|
53
|
+
self.assertEqual(1, 1)
|
|
54
|
+
else:
|
|
55
|
+
self.click_topbutton(driver, '机表抄表查询')
|
|
56
|
+
self.public_ctrl(driver)
|
|
57
|
+
|
|
58
|
+
@BeautifulReport.add_test_img("test_Egfsqquery")
|
|
59
|
+
def test_Egfsqquery(self):
|
|
60
|
+
"""填写所有内容后进行免费送气查询"""
|
|
61
|
+
close_current_page(driver)
|
|
62
|
+
sleep(0.5)
|
|
63
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
64
|
+
target_list = find_li(driver)
|
|
65
|
+
if '免费送气查询' not in target_list:
|
|
66
|
+
print('当前页面不存在此测试项')
|
|
67
|
+
self.assertEqual(1, 1)
|
|
68
|
+
else:
|
|
69
|
+
self.click_topbutton(driver, '免费送气查询')
|
|
70
|
+
self.public_ctrl(driver)
|
|
71
|
+
|
|
72
|
+
@BeautifulReport.add_test_img("test_Emhquery")
|
|
73
|
+
def test_Emhquery(self):
|
|
74
|
+
"""填写所有内容后进行过户查询"""
|
|
75
|
+
close_current_page(driver)
|
|
76
|
+
sleep(0.5)
|
|
77
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
78
|
+
target_list = find_li(driver)
|
|
79
|
+
if '过户查询' not in target_list:
|
|
80
|
+
print('当前页面不存在此测试项')
|
|
81
|
+
self.assertEqual(1, 1)
|
|
82
|
+
else:
|
|
83
|
+
self.click_topbutton(driver, '过户查询')
|
|
84
|
+
self.public_ctrl(driver)
|
|
85
|
+
|
|
86
|
+
@BeautifulReport.add_test_img("test_Enhquery")
|
|
87
|
+
def test_Enhquery(self):
|
|
88
|
+
"""填写所有内容后进行记录转移查询"""
|
|
89
|
+
close_current_page(driver)
|
|
90
|
+
sleep(0.5)
|
|
91
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
92
|
+
target_list = find_li(driver)
|
|
93
|
+
if '记录转移查询' not in target_list:
|
|
94
|
+
print('当前页面不存在此测试项')
|
|
95
|
+
self.assertEqual(1, 1)
|
|
96
|
+
else:
|
|
97
|
+
self.click_topbutton(driver, '记录转移查询')
|
|
98
|
+
self.public_ctrl(driver)
|
|
99
|
+
|
|
100
|
+
@BeautifulReport.add_test_img("test_Fqtquery")
|
|
101
|
+
def test_Fqtquery(self):
|
|
102
|
+
"""填写所有内容后进行其他收费查询"""
|
|
103
|
+
close_current_page(driver)
|
|
104
|
+
sleep(0.5)
|
|
105
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
106
|
+
target_list = find_li(driver)
|
|
107
|
+
if '其他收费查询' not in target_list:
|
|
108
|
+
print('当前页面不存在此测试项')
|
|
109
|
+
self.assertEqual(1, 1)
|
|
110
|
+
else:
|
|
111
|
+
self.click_topbutton(driver, '其他收费查询')
|
|
112
|
+
self.public_ctrl(driver)
|
|
113
|
+
|
|
114
|
+
@BeautifulReport.add_test_img("test_Fqtsfqfquery")
|
|
115
|
+
def test_Fqtsfqfquery(self):
|
|
116
|
+
"""填写所有内容后进行其他收费查询"""
|
|
117
|
+
close_current_page(driver)
|
|
118
|
+
sleep(0.5)
|
|
119
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
120
|
+
target_list = find_li(driver)
|
|
121
|
+
if '其他收费欠费查询' not in target_list:
|
|
122
|
+
print('当前页面不存在此测试项')
|
|
123
|
+
self.assertEqual(1, 1)
|
|
124
|
+
else:
|
|
125
|
+
self.click_topbutton(driver, '其他收费欠费查询')
|
|
126
|
+
self.public_ctrl(driver)
|
|
127
|
+
|
|
128
|
+
@BeautifulReport.add_test_img("test_GDbjsbquery")
|
|
129
|
+
def test_GDbjsbquery(self):
|
|
130
|
+
"""填写所有内容后进行冲正查询"""
|
|
131
|
+
close_current_page(driver)
|
|
132
|
+
sleep(0.5)
|
|
133
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
134
|
+
target_list = find_li(driver)
|
|
135
|
+
if '冲正查询' not in target_list:
|
|
136
|
+
print('当前页面不存在此测试项')
|
|
137
|
+
self.assertEqual(1, 1)
|
|
138
|
+
else:
|
|
139
|
+
self.click_topbutton(driver, '冲正查询')
|
|
140
|
+
self.public_ctrl(driver)
|
|
141
|
+
|
|
142
|
+
@BeautifulReport.add_test_img("test_HDbjsbquery")
|
|
143
|
+
def test_HDbjsbquery(self):
|
|
144
|
+
"""填写所有内容后进行补卡查询"""
|
|
145
|
+
close_current_page(driver)
|
|
146
|
+
sleep(0.5)
|
|
147
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
148
|
+
target_list = find_li(driver)
|
|
149
|
+
if '补卡查询' not in target_list:
|
|
150
|
+
print('当前页面不存在此测试项')
|
|
151
|
+
self.assertEqual(1, 1)
|
|
152
|
+
else:
|
|
153
|
+
self.click_topbutton(driver, '补卡查询')
|
|
154
|
+
self.public_ctrl(driver)
|
|
155
|
+
|
|
156
|
+
@BeautifulReport.add_test_img("test_IDbjsbquery")
|
|
157
|
+
def test_IDbjsbquery(self):
|
|
158
|
+
"""填写所有内容后进行业务查询"""
|
|
159
|
+
close_current_page(driver)
|
|
160
|
+
sleep(0.5)
|
|
161
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
162
|
+
target_list = find_li(driver)
|
|
163
|
+
if '补气查询' not in target_list:
|
|
164
|
+
print('当前页面不存在此测试项')
|
|
165
|
+
self.assertEqual(1, 1)
|
|
166
|
+
else:
|
|
167
|
+
self.click_topbutton(driver, '补气查询')
|
|
168
|
+
self.public_ctrl(driver)
|
|
169
|
+
|
|
170
|
+
@BeautifulReport.add_test_img("test_Ibjsbquery")
|
|
171
|
+
def test_Ibjsbquery(self):
|
|
172
|
+
"""填写所有内容后进行启用查询"""
|
|
173
|
+
close_current_page(driver)
|
|
174
|
+
sleep(0.5)
|
|
175
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
176
|
+
target_list = find_li(driver)
|
|
177
|
+
if '启用查询' not in target_list:
|
|
178
|
+
print('当前页面不存在此测试项')
|
|
179
|
+
self.assertEqual(1, 1)
|
|
180
|
+
else:
|
|
181
|
+
self.click_topbutton(driver, '启用查询')
|
|
182
|
+
self.public_ctrl(driver)
|
|
183
|
+
|
|
184
|
+
@BeautifulReport.add_test_img("test_Gbjsbquery")
|
|
185
|
+
def test_Gbjsbquery(self):
|
|
186
|
+
"""填写所有内容后进行停用查询"""
|
|
187
|
+
close_current_page(driver)
|
|
188
|
+
sleep(0.5)
|
|
189
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
190
|
+
target_list = find_li(driver)
|
|
191
|
+
if '停用查询' not in target_list:
|
|
192
|
+
print('当前页面不存在此测试项')
|
|
193
|
+
self.assertEqual(1, 1)
|
|
194
|
+
else:
|
|
195
|
+
self.click_topbutton(driver, '停用查询')
|
|
196
|
+
self.public_ctrl(driver)
|
|
197
|
+
|
|
198
|
+
@BeautifulReport.add_test_img("test_Kbjsbquery")
|
|
199
|
+
def test_Kbjsbquery(self):
|
|
200
|
+
"""填写所有内容后进行销户查询"""
|
|
201
|
+
close_current_page(driver)
|
|
202
|
+
sleep(0.5)
|
|
203
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
204
|
+
target_list = find_li(driver)
|
|
205
|
+
if '销户查询' not in target_list:
|
|
206
|
+
print('当前页面不存在此测试项')
|
|
207
|
+
self.assertEqual(1, 1)
|
|
208
|
+
else:
|
|
209
|
+
self.click_topbutton(driver, '销户查询')
|
|
210
|
+
self.public_ctrl(driver)
|
|
211
|
+
|
|
212
|
+
@BeautifulReport.add_test_img("test_Lbjsbquery")
|
|
213
|
+
def test_Lbjsbquery(self):
|
|
214
|
+
"""填写所有内容后进行减免优惠查询"""
|
|
215
|
+
close_current_page(driver)
|
|
216
|
+
sleep(0.5)
|
|
217
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
218
|
+
target_list = find_li(driver)
|
|
219
|
+
if '减免优惠查询' not in target_list:
|
|
220
|
+
print('当前页面不存在此测试项')
|
|
221
|
+
self.assertEqual(1, 1)
|
|
222
|
+
else:
|
|
223
|
+
self.click_topbutton(driver, '减免优惠查询')
|
|
224
|
+
self.public_ctrl(driver)
|
|
225
|
+
|
|
226
|
+
@BeautifulReport.add_test_img("test_Mbjsbquery")
|
|
227
|
+
def test_Mbjsbquery(self):
|
|
228
|
+
"""填写所有内容后进行业务查询"""
|
|
229
|
+
close_current_page(driver)
|
|
230
|
+
sleep(0.5)
|
|
231
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
232
|
+
target_list = find_li(driver)
|
|
233
|
+
if '调价补差查询' not in target_list:
|
|
234
|
+
print('当前页面不存在此测试项')
|
|
235
|
+
self.assertEqual(1, 1)
|
|
236
|
+
else:
|
|
237
|
+
self.click_topbutton(driver, '调价补差查询')
|
|
238
|
+
self.public_ctrl(driver)
|
|
239
|
+
|
|
240
|
+
@BeautifulReport.add_test_img("test_Nbjsbquery")
|
|
241
|
+
def test_Nbjsbquery(self):
|
|
242
|
+
"""填写所有内容后进行迁表查询"""
|
|
243
|
+
close_current_page(driver)
|
|
244
|
+
sleep(0.5)
|
|
245
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
246
|
+
target_list = find_li(driver)
|
|
247
|
+
if '迁表查询' not in target_list:
|
|
248
|
+
print('当前页面不存在此测试项')
|
|
249
|
+
self.assertEqual(1, 1)
|
|
250
|
+
else:
|
|
251
|
+
self.click_topbutton(driver, '迁表查询')
|
|
252
|
+
self.public_ctrl(driver)
|
|
253
|
+
|
|
254
|
+
@BeautifulReport.add_test_img("test_Objsbquery")
|
|
255
|
+
def test_Objsbquery(self):
|
|
256
|
+
"""填写所有内容后进行卡表抄表查询"""
|
|
257
|
+
close_current_page(driver)
|
|
258
|
+
sleep(0.5)
|
|
259
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
260
|
+
target_list = find_li(driver)
|
|
261
|
+
if '卡表抄表查询' not in target_list:
|
|
262
|
+
print('当前页面不存在此测试项')
|
|
263
|
+
self.assertEqual(1, 1)
|
|
264
|
+
else:
|
|
265
|
+
self.click_topbutton(driver, '卡表抄表查询')
|
|
266
|
+
self.public_ctrl(driver)
|
|
267
|
+
|
|
268
|
+
@BeautifulReport.add_test_img("test_Pbjsbquery")
|
|
269
|
+
def test_Pbjsbquery(self):
|
|
270
|
+
"""填写所有内容后进行收据查询"""
|
|
271
|
+
close_current_page(driver)
|
|
272
|
+
sleep(0.5)
|
|
273
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
274
|
+
target_list = find_li(driver)
|
|
275
|
+
if '收据查询' not in target_list:
|
|
276
|
+
print('当前页面不存在此测试项')
|
|
277
|
+
self.assertEqual(1, 1)
|
|
278
|
+
else:
|
|
279
|
+
self.click_topbutton(driver, '收据查询')
|
|
280
|
+
self.public_ctrl(driver)
|
|
281
|
+
|
|
282
|
+
@BeautifulReport.add_test_img("test_Qbjsbquery")
|
|
283
|
+
def test_Qbjsbquery(self):
|
|
284
|
+
"""填写所有内容后进行业务查询"""
|
|
285
|
+
close_current_page(driver)
|
|
286
|
+
sleep(0.5)
|
|
287
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
288
|
+
target_list = find_li(driver)
|
|
289
|
+
if '业务查询' not in target_list:
|
|
290
|
+
print('当前页面不存在此测试项')
|
|
291
|
+
self.assertEqual(1, 1)
|
|
292
|
+
else:
|
|
293
|
+
self.click_topbutton(driver, '业务查询')
|
|
294
|
+
self.public_ctrl(driver)
|
|
295
|
+
|
|
296
|
+
@BeautifulReport.add_test_img("test_Rbjsbquery")
|
|
297
|
+
def test_Rbjsbquery(self):
|
|
298
|
+
"""填写所有内容后进行预存查询"""
|
|
299
|
+
close_current_page(driver)
|
|
300
|
+
sleep(0.5)
|
|
301
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
302
|
+
target_list = find_li(driver)
|
|
303
|
+
if '预存查询' not in target_list:
|
|
304
|
+
print('当前页面不存在此测试项')
|
|
305
|
+
self.assertEqual(1, 1)
|
|
306
|
+
else:
|
|
307
|
+
self.click_topbutton(driver, '预存查询')
|
|
308
|
+
self.public_ctrl(driver)
|
|
309
|
+
|
|
310
|
+
@BeautifulReport.add_test_img("test_Sbjsbquery")
|
|
311
|
+
def test_Sbjsbquery(self):
|
|
312
|
+
"""填写所有内容后进行发折查询"""
|
|
313
|
+
close_current_page(driver)
|
|
314
|
+
sleep(0.5)
|
|
315
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
316
|
+
target_list = find_li(driver)
|
|
317
|
+
if '发折查询' not in target_list:
|
|
318
|
+
print('当前页面不存在此测试项')
|
|
319
|
+
self.assertEqual(1, 1)
|
|
320
|
+
else:
|
|
321
|
+
self.click_topbutton(driver, '发折查询')
|
|
322
|
+
self.public_ctrl(driver)
|
|
323
|
+
|
|
324
|
+
@BeautifulReport.add_test_img("test_Tbjsbquery")
|
|
325
|
+
def test_Tbjsbquery(self):
|
|
326
|
+
"""填写所有内容后进行可疑用户查询"""
|
|
327
|
+
close_current_page(driver)
|
|
328
|
+
sleep(0.5)
|
|
329
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
330
|
+
target_list = find_li(driver)
|
|
331
|
+
if '可疑用户查询' not in target_list:
|
|
332
|
+
print('当前页面不存在此测试项')
|
|
333
|
+
self.assertEqual(1, 1)
|
|
334
|
+
else:
|
|
335
|
+
self.click_topbutton(driver, '可疑用户查询')
|
|
336
|
+
self.public_ctrl(driver)
|
|
337
|
+
|
|
338
|
+
@BeautifulReport.add_test_img("test_Ubjsbquery")
|
|
339
|
+
def test_Ubjsbquery(self):
|
|
340
|
+
"""填写所有内容后进行气价变更查询"""
|
|
341
|
+
close_current_page(driver)
|
|
342
|
+
sleep(0.5)
|
|
343
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
344
|
+
target_list = find_li(driver)
|
|
345
|
+
if '气价变更查询' not in target_list:
|
|
346
|
+
print('当前页面不存在此测试项')
|
|
347
|
+
self.assertEqual(1, 1)
|
|
348
|
+
else:
|
|
349
|
+
self.click_topbutton(driver, '气价变更查询')
|
|
350
|
+
self.public_ctrl(driver)
|
|
351
|
+
|
|
352
|
+
@BeautifulReport.add_test_img("test_Tjsbquery")
|
|
353
|
+
def test_Tjsbquery(self):
|
|
354
|
+
"""填写所有内容后进行扎帐查询"""
|
|
355
|
+
close_current_page(driver)
|
|
356
|
+
sleep(0.5)
|
|
357
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
358
|
+
target_list = find_li(driver)
|
|
359
|
+
if '扎帐查询' not in target_list:
|
|
360
|
+
print('当前页面不存在此测试项')
|
|
361
|
+
self.assertEqual(1, 1)
|
|
362
|
+
else:
|
|
363
|
+
self.click_topbutton(driver, '扎帐查询')
|
|
364
|
+
self.public_ctrl(driver)
|
|
365
|
+
|
|
366
|
+
@BeautifulReport.add_test_img("test_Ujsbquery")
|
|
367
|
+
def test_Ujsbquery(self):
|
|
368
|
+
"""填写所有内容后进行调价记录查询"""
|
|
369
|
+
close_current_page(driver)
|
|
370
|
+
sleep(0.5)
|
|
371
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
372
|
+
target_list = find_li(driver)
|
|
373
|
+
if '调价记录查询' not in target_list:
|
|
374
|
+
print('当前页面不存在此测试项')
|
|
375
|
+
self.assertEqual(1, 1)
|
|
376
|
+
else:
|
|
377
|
+
self.click_topbutton(driver, '调价记录查询')
|
|
378
|
+
self.public_ctrl(driver)
|
|
379
|
+
|
|
380
|
+
@BeautifulReport.add_test_img("test_Vbjsbquery")
|
|
381
|
+
def test_Vbjsbquery(self):
|
|
382
|
+
"""填写所有内容后进行维护记录查询"""
|
|
383
|
+
close_current_page(driver)
|
|
384
|
+
sleep(0.5)
|
|
385
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
386
|
+
target_list = find_li(driver)
|
|
387
|
+
if '维护记录查询' not in target_list:
|
|
388
|
+
print('当前页面不存在此测试项')
|
|
389
|
+
self.assertEqual(1, 1)
|
|
390
|
+
else:
|
|
391
|
+
self.click_topbutton(driver, '维护记录查询')
|
|
392
|
+
self.public_ctrl(driver)
|
|
393
|
+
|
|
394
|
+
@BeautifulReport.add_test_img("test_Wbjsbquery")
|
|
395
|
+
def test_Wbjsbquery(self):
|
|
396
|
+
"""填写所有内容后进行气损收费查询"""
|
|
397
|
+
close_current_page(driver)
|
|
398
|
+
sleep(0.5)
|
|
399
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
400
|
+
target_list = find_li(driver)
|
|
401
|
+
if '气损收费查询' not in target_list:
|
|
402
|
+
print('当前页面不存在此测试项')
|
|
403
|
+
self.assertEqual(1, 1)
|
|
404
|
+
else:
|
|
405
|
+
self.click_topbutton(driver, '气损收费查询')
|
|
406
|
+
self.public_ctrl(driver)
|
|
407
|
+
|
|
408
|
+
@BeautifulReport.add_test_img("test_Xbjsbquery")
|
|
409
|
+
def test_Xbjsbquery(self):
|
|
410
|
+
"""填写所有内容后进行气价信息查询"""
|
|
411
|
+
close_current_page(driver)
|
|
412
|
+
sleep(0.5)
|
|
413
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
414
|
+
target_list = find_li(driver)
|
|
415
|
+
if '气价信息查询' not in target_list:
|
|
416
|
+
print('当前页面不存在此测试项')
|
|
417
|
+
self.assertEqual(1, 1)
|
|
418
|
+
else:
|
|
419
|
+
self.click_topbutton(driver, '气价信息查询')
|
|
420
|
+
self.public_ctrl(driver)
|
|
421
|
+
|
|
422
|
+
@BeautifulReport.add_test_img("test_Ybjsbquery")
|
|
423
|
+
def test_Ybjsbquery(self):
|
|
424
|
+
"""填写所有内容后进行团缴查询"""
|
|
425
|
+
close_current_page(driver)
|
|
426
|
+
sleep(0.5)
|
|
427
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
428
|
+
target_list = find_li(driver)
|
|
429
|
+
if '团缴查询' not in target_list:
|
|
430
|
+
print('当前页面不存在此测试项')
|
|
431
|
+
self.assertEqual(1, 1)
|
|
432
|
+
else:
|
|
433
|
+
self.click_topbutton(driver, '团缴查询')
|
|
434
|
+
self.public_ctrl(driver)
|
|
435
|
+
|
|
436
|
+
@BeautifulReport.add_test_img("test_Yqfjtmxquery")
|
|
437
|
+
def test_Yqfjtmxquery(self):
|
|
438
|
+
"""填写所有内容后进行气费阶梯明细查询"""
|
|
439
|
+
close_current_page(driver)
|
|
440
|
+
sleep(0.5)
|
|
441
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
442
|
+
target_list = find_li(driver)
|
|
443
|
+
if '气费阶梯明细' not in target_list:
|
|
444
|
+
print('当前页面不存在此测试项')
|
|
445
|
+
self.assertEqual(1, 1)
|
|
446
|
+
else:
|
|
447
|
+
self.click_topbutton(driver, '气费阶梯明细')
|
|
448
|
+
self.public_ctrl(driver)
|
|
449
|
+
|
|
450
|
+
# @BeautifulReport.add_test_img("test_Yzzywbgjlquery")
|
|
451
|
+
# def test_Yzzywbgjlquery(self):
|
|
452
|
+
# """填写所有内容后进行增值业务变更记录"""
|
|
453
|
+
# close_current_page(driver)
|
|
454
|
+
# sleep(0.5)
|
|
455
|
+
# present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
456
|
+
# target_list = find_li(driver)
|
|
457
|
+
# if '增值业务变更记录' not in target_list:
|
|
458
|
+
# print('当前页面不存在此测试项')
|
|
459
|
+
# self.assertEqual(1, 1)
|
|
460
|
+
# else:
|
|
461
|
+
# self.click_topbutton(driver, '增值业务变更记录')
|
|
462
|
+
# self.public_ctrl(driver)
|
|
463
|
+
|
|
464
|
+
@BeautifulReport.add_test_img("test_Yyhzzywcxquery")
|
|
465
|
+
def test_Yyhzzywcxquery(self):
|
|
466
|
+
"""填写所有内容后进行用户增值业务查询"""
|
|
467
|
+
close_current_page(driver)
|
|
468
|
+
sleep(0.5)
|
|
469
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
470
|
+
target_list = find_li(driver)
|
|
471
|
+
if '用户增值业务查询' not in target_list:
|
|
472
|
+
print('当前页面不存在此测试项')
|
|
473
|
+
self.assertEqual(1, 1)
|
|
474
|
+
else:
|
|
475
|
+
self.click_topbutton(driver, '用户增值业务查询')
|
|
476
|
+
self.public_ctrl(driver)
|
|
477
|
+
|
|
478
|
+
# @BeautifulReport.add_test_img("test_Yzzywxbcxquery")
|
|
479
|
+
# def test_Yzzywxbcxquery(self):
|
|
480
|
+
# """填写所有内容后进行增值业务续保查询"""
|
|
481
|
+
# close_current_page(driver)
|
|
482
|
+
# sleep(0.5)
|
|
483
|
+
# present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
484
|
+
# target_list = find_li(driver)
|
|
485
|
+
# if '增值业务续保查询' not in target_list:
|
|
486
|
+
# print('当前页面不存在此测试项')
|
|
487
|
+
# self.assertEqual(1, 1)
|
|
488
|
+
# else:
|
|
489
|
+
# self.click_topbutton(driver, '增值业务续保查询')
|
|
490
|
+
# self.public_ctrl(driver)
|
|
491
|
+
|
|
492
|
+
@BeautifulReport.add_test_img("test_YZquery")
|
|
493
|
+
def test_YZquery(self):
|
|
494
|
+
"""填写所有内容后进行增值业务汇总查询"""
|
|
495
|
+
close_current_page(driver)
|
|
496
|
+
sleep(0.5)
|
|
497
|
+
present_wait(driver, By.ID, "vc-tree-name-业务查询").click()
|
|
498
|
+
target_list = find_li(driver)
|
|
499
|
+
if '增值业务汇总查询' not in target_list:
|
|
500
|
+
print('当前页面不存在此测试项')
|
|
501
|
+
self.assertEqual(1, 1)
|
|
502
|
+
else:
|
|
503
|
+
self.click_topbutton(driver, '增值业务汇总查询')
|
|
504
|
+
self.public_ctrl(driver)
|
|
505
|
+
|
|
506
|
+
def test_zZZZ_END(self):
|
|
507
|
+
"""当前测试模块结束,关闭浏览器"""
|
|
508
|
+
driver.quit()
|
|
509
|
+
|
|
510
|
+
def click_topbutton(self, driver, but_name):
|
|
511
|
+
top_button_group = present_waits(driver, By.XPATH, '//div[@class = "flex foot_tabset"]//li/button')
|
|
512
|
+
for target_button in top_button_group:
|
|
513
|
+
if target_button.text == but_name:
|
|
514
|
+
target_button.click()
|
|
515
|
+
|
|
516
|
+
topbuttons = present_waits(driver, By.XPATH, '//div[@class="button_spacing button_shrink_bottom"]')
|
|
517
|
+
for topbutton in topbuttons:
|
|
518
|
+
if topbutton.is_displayed():
|
|
519
|
+
topbutton.click()
|
|
520
|
+
break
|
|
521
|
+
|
|
522
|
+
def public_ctrl(self, driver):
|
|
523
|
+
# 输入框
|
|
524
|
+
input_border(driver, '//div[@class="col-sm-2 form-group"]/input')
|
|
525
|
+
# 选择框
|
|
526
|
+
choose_border(driver, '//div[@class="btn-group"]')
|
|
527
|
+
# 选择小区
|
|
528
|
+
area_choose(driver)
|
|
529
|
+
# 日期框
|
|
530
|
+
data_border(driver, '//div[@class="datepicker"]')
|
|
531
|
+
|
|
532
|
+
search_buttons = present_waits(driver, By.XPATH, '//button[text()="查询"]')
|
|
533
|
+
for search_button in search_buttons:
|
|
534
|
+
if search_button.is_displayed():
|
|
535
|
+
search_button.click()
|
|
536
|
+
break
|
|
537
|
+
result = is_element_load(driver, '//p[contains(text(),"错误码")]')
|
|
538
|
+
expect = '测试'
|
|
539
|
+
if not result:
|
|
540
|
+
print(' 查询功能未报错,测试通过 ')
|
|
541
|
+
expect = '查询功能未报错,测试通过'
|
|
542
|
+
else:
|
|
543
|
+
print(' 查询功能报错,测试失败 ')
|
|
544
|
+
self.assertEqual(expect, '查询功能未报错,测试通过')
|
|
545
|
+
|
|
546
|
+
def tearDown(self):
|
|
547
|
+
pass
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
from BeautifulReport import BeautifulReport
|
|
2
|
+
from PublicScript import *
|
|
3
|
+
from BasePage import basepage
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class as_SummaryQueryScript2(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_Aqianfcxkhquery")
|
|
15
|
+
def test_Aqianfcxkhquery(self):
|
|
16
|
+
"""进行小区综合查询测试"""
|
|
17
|
+
global driver
|
|
18
|
+
driver = self.get_driver()
|
|
19
|
+
present_wait(driver, By.ID, "vc-tree-name-综合查询").click()
|
|
20
|
+
present_wait(driver, By.ID, "vc-tree-name-汇总查询").click()
|
|
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
|
+
def test_zZZZ_END(self):
|
|
30
|
+
"""当前测试模块结束,关闭浏览器"""
|
|
31
|
+
driver.quit()
|
|
32
|
+
|
|
33
|
+
def click_topbutton(self, driver, but_name):
|
|
34
|
+
top_button_group = present_waits(driver, By.XPATH, '//div[@class = "flex foot_tabset"]//li/button')
|
|
35
|
+
for target_button in top_button_group:
|
|
36
|
+
if target_button.text == but_name:
|
|
37
|
+
target_button.click()
|
|
38
|
+
|
|
39
|
+
topbuttons = present_waits(driver, By.XPATH, '//div[@class="button_spacing button_shrink_bottom"]')
|
|
40
|
+
for topbutton in topbuttons:
|
|
41
|
+
if topbutton.is_displayed():
|
|
42
|
+
topbutton.click()
|
|
43
|
+
break
|
|
44
|
+
|
|
45
|
+
def public_ctrl(self, driver):
|
|
46
|
+
search_buttons = present_waits(driver, By.XPATH, '//button[text()="查询"]')
|
|
47
|
+
for search_button in search_buttons:
|
|
48
|
+
if search_button.is_displayed():
|
|
49
|
+
search_button.click()
|
|
50
|
+
break
|
|
51
|
+
sleep(2)
|
|
52
|
+
driver.execute_script("document.body.style.zoom='0.6'")
|
|
53
|
+
sleep(0.5)
|
|
54
|
+
expect = '测试通过'
|
|
55
|
+
tds = present_waits(driver, By.XPATH, './/table[@class="table-hover"]//td')
|
|
56
|
+
for td in tds:
|
|
57
|
+
if td.text == '物联用气量合计: 0':
|
|
58
|
+
expect = '物联网用气量为0,测试不通过'
|
|
59
|
+
print(expect)
|
|
60
|
+
self.assertEqual(expect, '测试通过')
|
|
61
|
+
|
|
62
|
+
# 下拉框通用操作
|
|
63
|
+
def choose_border2(xpath):
|
|
64
|
+
border = is_element_load(driver, xpath)
|
|
65
|
+
if border:
|
|
66
|
+
select_group1 = present_waits(driver, By.XPATH, xpath)
|
|
67
|
+
for select1 in select_group1:
|
|
68
|
+
if select1.is_enabled() and select1.is_displayed():
|
|
69
|
+
select1.click()
|
|
70
|
+
element = './/ul/li'
|
|
71
|
+
if is_element_exist(select1, element):
|
|
72
|
+
last_one = select1.find_element_by_xpath('.//ul/li[last()]/a')
|
|
73
|
+
if last_one.is_displayed() and last_one.is_enabled():
|
|
74
|
+
last_one.click()
|
|
75
|
+
|
|
76
|
+
def tearDown(self):
|
|
77
|
+
pass
|