Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-sc
Commits
a160c685
Commit
a160c685
authored
Nov 13, 2023
by
章 登恒
Browse files
commit
parent
6f5b49b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
testcase/test_scene1/scene1_mainflow.py
View file @
a160c685
...
...
@@ -34,7 +34,7 @@ from public.tools import *
chrome
=
webdriver
.
Chrome
()
chrome
.
maximize_window
()
wait
=
WebDriverWait
(
chrome
,
2
0
,
poll_frequency
=
0.2
)
wait
=
WebDriverWait
(
chrome
,
3
0
,
poll_frequency
=
0.2
)
SIT_URL
=
'http://scdev.cmic.com.cn:8088/beta/'
#SIT环境地址
...
...
testcase/test_scene11/scene11_mainflow.py
View file @
a160c685
...
...
@@ -231,16 +231,18 @@ class SalesOrder(PurchaseOrder):
if
type
==
1
:
#审核流程
#点击审核通过
chrome
.
find_element_by_xpath
(
'//span[text()="审核通过"]'
).
click
()
#点击确定按钮
wait
.
until
(
ec
.
presence_of_element_located
((
By
.
XPATH
,
'//button[@class="el-button el-button--primary el-button--mini awsui-button awsui-button--primary"]/span'
)))
sleep
(
0.5
)
#点击确定按钮
chrome
.
find_element_by_xpath
(
'//button[@class="el-button el-button--primary el-button--mini awsui-button awsui-button--primary"]/span'
).
click
()
wait
.
until
(
ec
.
presence_of_element_located
((
By
.
XPATH
,
'//textarea[@placeholder="意见留言"]'
)))
sleep
(
0.5
)
#填写审核通过信息
wait
.
until
(
ec
.
presence_of_element_located
((
By
.
XPATH
,
'//textarea[@placeholder="意见留言"]'
)))
sleep
(
0.5
)
chrome
.
find_element_by_xpath
(
'//textarea[@placeholder="意见留言"]'
).
send_keys
(
'审核通过'
)
sleep
(
0.5
)
#点击发送按钮
...
...
@@ -428,10 +430,10 @@ if __name__ == '__main__':
step2_2
.
closetab
()
step2_2
.
query_click
(
'销售订单'
,
jyhtorder
,
'vxe-body--column col_19 col--center col--ellipsis dw-click-cell'
,
'要货申请订单号'
)
sotorderno
=
step4
.
return_sotorderno
()
step4
.
button_click1
(
type
=
3
)
step4
.
button_click1
(
type
=
3
)
#提交订单
step2_2
.
switch_loggin
(
usr1
,
pwd1
)
step2_2
.
query_click
(
'销售订单'
,
jyhtorder
,
'vxe-body--column col_19 col--center col--ellipsis dw-click-cell'
,
'要货申请订单号'
)
step
4
.
button_click2
(
msg1
=
'发送成功'
)
step
2_2
.
button_click2
(
msg1
=
'发送成功'
)
#审核订单
step2_2
.
switch_loggin
(
usr4
,
pwd4
)
step5_1
.
deliver_goods
(
sotorderno
)
#仓库发货
step5_1
.
picking_goods
(
sotorderno
)
#仓库拣货
...
...
@@ -454,8 +456,8 @@ if __name__ == '__main__':
traceback
.
print_exc
()
step6
.
handle
(
errmsg1
,
e
)
finally
:
chrome
.
quit
()
#
finally:
#
chrome.quit()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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