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
bb39e3ae
Commit
bb39e3ae
authored
Nov 07, 2023
by
章 登恒
Browse files
commit
parent
df0df3a4
Changes
5
Hide whitespace changes
Inline
Side-by-side
testcase/test_scene1/scene1_mainflow.py
View file @
bb39e3ae
...
@@ -211,8 +211,8 @@ class PurchaseOrder():###普通采购单界面操作
...
@@ -211,8 +211,8 @@ class PurchaseOrder():###普通采购单界面操作
sleep
(
1
)
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'//span[text()="确定"][1]'
).
click
()
chrome
.
find_element_by_xpath
(
'//span[text()="确定"][1]'
).
click
()
#元素el2出现时认为提交成功
#元素el2出现时认为提交成功
locator
=
(
By
.
CLASS_NAME
,
f
'
{
el2
}
'
)
locator
=
(
By
.
XPATH
,
f
'
{
el2
}
'
)
wait
.
until
_not
(
ec
.
presence_of_element_located
(
locator
))
wait
.
until
(
ec
.
presence_of_element_located
(
locator
))
self
.
closetab
()
self
.
closetab
()
...
@@ -497,8 +497,9 @@ class Outstore(PurchaseOrder):#出库三步曲
...
@@ -497,8 +497,9 @@ class Outstore(PurchaseOrder):#出库三步曲
sleep
(
1
)
sleep
(
1
)
#确定
#确定
chrome
.
find_element_by_xpath
(
'//span[text()="确定"]'
).
click
()
chrome
.
find_element_by_xpath
(
'//span[text()="确定"]'
).
click
()
sleep
(
3
)
wait
.
until
(
ec
.
visibility_of_element_located
((
By
.
XPATH
,
'//span[text()="确认发货"]'
)))
wait
.
until
(
ec
.
visibility_of_element_located
((
By
.
XPATH
,
'//span[text()="确认发货"]'
)))
sleep
(
2
)
sleep
(
1
)
# 确认发货
# 确认发货
chrome
.
find_element_by_xpath
(
'//span[text()="确认发货"]'
).
click
()
chrome
.
find_element_by_xpath
(
'//span[text()="确认发货"]'
).
click
()
sleep
(
0.5
)
sleep
(
0.5
)
...
...
testcase/test_scene4/test_scene4_mainflow2.py
View file @
bb39e3ae
...
@@ -39,6 +39,5 @@ def test_scene4_mainflow1():
...
@@ -39,6 +39,5 @@ def test_scene4_mainflow1():
step7
=
ExceptionHandling
()
step7
=
ExceptionHandling
()
traceback
.
print_exc
()
traceback
.
print_exc
()
step7
.
handle
(
errmsg4
,
e
)
step7
.
handle
(
errmsg4
,
e
)
finally
:
chrome
.
quit
()
testcase/test_scene6/scene6_mainflow.py
View file @
bb39e3ae
...
@@ -13,12 +13,17 @@ salesman = '杨春刚'#业务员名称
...
@@ -13,12 +13,17 @@ salesman = '杨春刚'#业务员名称
custname
=
'北京大学第三医院'
#客户名称
custname
=
'北京大学第三医院'
#客户名称
productcode
=
10005528
#商品编码
productcode
=
10005528
#商品编码
ARRIVAL_TEMP
=
24
#到货温度
ARRIVAL_TEMP
=
24
#到货温度
ARRIVAL_DATE
=
'2023-10-01'
#到货日期
ARRIVAL_DATE
=
'2023-10-01'
#到货日期
ARRIVAL_TIME
=
'00:00:00'
#到货时间
ARRIVAL_TIME
=
'00:00:00'
#到货时间
STASHIP_TEMP
=
24
#启运温度
STASHIP_TEMP
=
24
#启运温度
STASHIP_DATE
=
'2023-11-01'
#启运日期
STASHIP_DATE
=
'2023-11-01'
#启运日期
STASHIP_TIME
=
'00:00:00'
#启运时间
STASHIP_TIME
=
'00:00:00'
#启运时间
TRANS_MACHINE
=
'冷冻车'
#运输工具
surgicaldate
=
'2023-11-30'
#手术日期
contractnumber
=
40536
#合同号
errmsg6
=
'流程六:手术跟台及消耗结算流程异常,请检查!'
#流程异常提示信息
errmsg6
=
'流程六:手术跟台及消耗结算流程异常,请检查!'
#流程异常提示信息
...
@@ -236,9 +241,9 @@ class SurgicalLending(PurchaseOrder):#手术借出单
...
@@ -236,9 +241,9 @@ class SurgicalLending(PurchaseOrder):#手术借出单
#点击审核通过
#点击审核通过
chrome
.
find_element_by_xpath
(
'//span[text()="审核通过"]'
).
click
()
chrome
.
find_element_by_xpath
(
'//span[text()="审核通过"]'
).
click
()
#点击确定按钮
#点击确定按钮
wait
.
until
(
ec
.
presence_of_element_located
((
By
.
XPATH
,
'//span[text()="确定"]'
)))
#
wait.until(ec.presence_of_element_located((By.XPATH,'//span[text()="确定"]')))
sleep
(
0.5
)
#
sleep(0.5)
chrome
.
find_element_by_xpath
(
'//span[text()="确定"]'
).
click
()
#
chrome.find_element_by_xpath('//span[text()="确定"]').click()
locator
=
(
By
.
XPATH
,
'//textarea[@placeholder="意见留言"]'
)
locator
=
(
By
.
XPATH
,
'//textarea[@placeholder="意见留言"]'
)
wait
.
until
(
ec
.
presence_of_element_located
(
locator
))
wait
.
until
(
ec
.
presence_of_element_located
(
locator
))
...
@@ -414,34 +419,335 @@ class SurgicalReturn(PurchaseOrder):
...
@@ -414,34 +419,335 @@ class SurgicalReturn(PurchaseOrder):
def
return_hhshtorder
(
self
):
def
return_hhshtorder
(
self
):
return
orderno3
return
orderno3
class
Instore1
(
Instore
):
def
goods_check
(
self
,
orderno
,
type
=
2
):
# 仓库验收
# 调用query_click进入表单视图
PurchaseOrder
.
query_click
(
self
,
'仓库验收'
,
orderno
,
'vxe-body--column col_19 col--left col--ellipsis dw-click-cell'
,
qrcond
=
'收货单号'
)
wait
.
until
(
ec
.
visibility_of_element_located
((
By
.
XPATH
,
'//span[text()="提交"]'
)))
sleep
(
1.5
)
###获取手术还回订单号###
global
orderno5
orderno5
=
chrome
.
find_element_by_xpath
(
'//div[text() = "订单号 "]/following-sibling::div/span'
).
text
print
(
'手术还回订单号为:'
,
orderno5
)
# chrome.execute_script("document.getElementsByClassName('vxe-table--footer-wrapper body--wrapper')[0].scrollLeft = 2000")
# chrome.execute_script("document.getElementsByClassName('vxe-table--body-wrapper body--wrapper')[0].scrollTop = %s*30;" % i)
# 填写商品信息
for
i
in
range
(
1
):
# 填写验收数量
chrome
.
find_element_by_xpath
(
'(//td[@colid="col_150" and @f="F_ACCEPTANCE_NUM" and @i=%s])'
%
i
).
click
()
sleep
(
0.5
)
chrome
.
find_element_by_class_name
(
'awsui-input-number-right'
).
send_keys
(
1
)
sleep
(
0.5
)
chrome
.
find_element_by_xpath
(
'(//td[@colid="col_152" and @f="F_MAINUNIT_CODE" and @i=%s])'
%
i
).
click
()
sleep
(
0.5
)
# 浏览器页面右滑
chrome
.
execute_script
(
"document.getElementsByClassName('vxe-table--body-wrapper body--wrapper')[0].scrollLeft = 5300"
)
sleep
(
1
)
#填写启运温度
chrome
.
find_element_by_xpath
(
'(//td[@colid="col_185" and @f="F_STASHIP_TEMP" and @i=%s])'
%
i
).
click
()
sleep
(
0.5
)
chrome
.
find_element_by_class_name
(
'el-input__inner'
).
send_keys
(
STASHIP_TEMP
)
sleep
(
0.5
)
#填写到货温度
chrome
.
find_element_by_xpath
(
'(//td[@colid="col_186" and @f="F_ARRIVAL_TEMP" and @i=%s])'
%
i
).
click
()
sleep
(
0.5
)
chrome
.
find_element_by_class_name
(
'el-input__inner'
).
send_keys
(
ARRIVAL_TEMP
)
sleep
(
0.5
)
#填写启运日期
chrome
.
find_element_by_xpath
(
'(//td[@colid="col_187" and @f="F_STASHIP_DATE" and @i=%s])'
%
i
).
click
()
sleep
(
0.5
)
chrome
.
find_element_by_class_name
(
'el-input__inner'
).
send_keys
(
STASHIP_DATE
)
sleep
(
0.5
)
#填写启运时间
chrome
.
find_element_by_xpath
(
'(//td[@colid="col_188" and @f="F_STASHIP_TIME" and @i=%s])'
%
i
).
click
()
sleep
(
0.5
)
chrome
.
find_element_by_class_name
(
'el-input__inner'
).
send_keys
(
STASHIP_TIME
)
sleep
(
0.5
)
# 填写到货日期
chrome
.
find_element_by_xpath
(
'(//td[@colid="col_189" and @f="F_ARRIVAL_DATE" and @i=%s])'
%
i
).
click
()
sleep
(
0.5
)
chrome
.
find_element_by_class_name
(
'el-input__inner'
).
send_keys
(
ARRIVAL_DATE
)
sleep
(
0.5
)
#填写到货时间
chrome
.
find_element_by_xpath
(
'(//td[@colid="col_190" and @f="F_ARRIVAL_TIME" and @i=%s])'
%
i
).
click
()
sleep
(
0.5
)
chrome
.
find_element_by_class_name
(
'el-input__inner'
).
send_keys
(
ARRIVAL_TIME
)
sleep
(
0.5
)
#填写运输工具
chrome
.
find_element_by_xpath
(
'(//td[@colid="col_191" and @f="F_TRANS_MACHINE" and @i=%s])'
%
i
).
click
()
sleep
(
0.5
)
# chrome.find_element_by_class_name('el-input__inner').send_keys(TRANS_MACHINE)
chrome
.
find_element_by_xpath
(
'//li[text()="%s"]'
%
TRANS_MACHINE
).
click
()
sleep
(
0.5
)
# 调用button_click1保存/提交订单
PurchaseOrder
.
button_click1
(
self
,
type
)
print
(
'仓库验收成功'
)
def
return_hhtorderno
(
self
):
return
orderno5
class
SurgicalLendingSale
(
PurchaseOrder
):
def
data_add_surgicallendingsale
(
self
,
jctorder
):
###打开手术借出转销售###
wait
.
until
(
ec
.
presence_of_element_located
((
By
.
XPATH
,
'//span[text()="手术借出转销售"]'
)))
order_link
=
chrome
.
find_element_by_xpath
(
'//span[text()="手术借出转销售"]'
)
chrome
.
execute_script
(
"arguments[0].click();"
,
order_link
)
chrome
.
switch_to
.
frame
(
chrome
.
find_element_by_xpath
(
'(//iframe[@class="metro-main-frame"])[2]'
))
sleep
(
0.5
)
# 点击新建按钮
wait
.
until
(
ec
.
visibility_of_element_located
((
By
.
XPATH
,
'//span[text()="新建"]'
)))
sleep
(
0.5
)
chrome
.
find_element_by_xpath
(
'//span[text()="新建"]'
).
click
()
sleep
(
4
)
chrome
.
switch_to
.
frame
(
chrome
.
find_element_by_xpath
(
'//iframe[contains(@name,"awsui-dialog-iframe")]'
))
sleep
(
2
)
###获取订单号###
global
orderno4
orderno4
=
chrome
.
find_element_by_xpath
(
'//div[text() = "销售订单号 "]/following-sibling::div/span'
).
text
print
(
'手术借出转销售订单号为:'
,
orderno4
)
# 点击业务员名称并输入查询条件,查询出结果
chrome
.
find_element_by_xpath
(
'//div[text()="业务员名称 "]/following-sibling::div/div/div/div/div/div/div/div/span/span/i'
).
click
()
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'//input[@placeholder="模糊检索:员工编码,员工名称"]'
).
send_keys
(
salesman
)
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'//input[@placeholder="模糊检索:员工编码,员工名称"]'
).
send_keys
(
Keys
.
ENTER
)
sleep
(
1
)
# 勾选查询出的业务员并点击确定按钮
btn_div
=
chrome
.
find_element_by_xpath
(
'//span/input[@type="radio" and @value="07fa3921bd06ea4d4114a7dfd887433bc"]'
)
chrome
.
execute_script
(
"arguments[0].click();"
,
btn_div
)
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'(//span[@class="ensureBtn"]/button[1])'
).
click
()
sleep
(
1
)
# 点击出库仓库名称,输入仓库名并查询出结果
chrome
.
find_element_by_xpath
(
'//div[text()="出库仓库 "]/following-sibling::div/div/div/div/div/div/div/div/span/span/i'
).
click
()
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'//input[@placeholder="模糊检索:仓库编码,仓库名称"]'
).
send_keys
(
lendin
)
chrome
.
find_element_by_xpath
(
'//input[@placeholder="模糊检索:仓库编码,仓库名称"]'
).
send_keys
(
Keys
.
ENTER
)
sleep
(
1
)
# 勾选查询出的仓库并点击确定按钮
btn_div
=
chrome
.
find_element_by_xpath
(
'//span/input[@type="radio" and @value="0e853ab0be3dae1bdbb65b6699abab0cd"]'
)
chrome
.
execute_script
(
"arguments[0].click();"
,
btn_div
)
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'(//button[@class="el-button el-button--primary el-button--default"])[2]'
).
click
()
sleep
(
1
)
# 输入手术日期
chrome
.
find_element_by_xpath
(
'//label[text()="手术日期 "]/following-sibling::div/div'
).
click
()
sleep
(
0.5
)
chrome
.
find_element_by_class_name
(
'el-input__inner'
).
send_keys
(
surgicaldate
)
sleep
(
1
)
#切换到客户及合同信息页
chrome
.
find_element_by_xpath
(
'//div[text()="客户及合同信息"]'
).
click
()
sleep
(
1
)
# 点击采购合同/协议号并输入信息,查询出结果
wait
.
until
(
ec
.
visibility_of_element_located
((
By
.
XPATH
,
'//div[text()="合同号 "]/following-sibling::div/div/div/div/div/div/div/div/span/span/i'
)))
sleep
(
0.5
)
chrome
.
find_element_by_xpath
(
'//div[text()="合同号 "]/following-sibling::div/div/div/div/div/div/div/div/span/span/i'
).
click
()
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'//input[@placeholder="模糊检索:合同号,合同协议号,对方编码,项目名称,项目编码,业态编码"]'
).
send_keys
(
contractnumber
)
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'//input[@placeholder="模糊检索:合同号,合同协议号,对方编码,项目名称,项目编码,业态编码"]'
).
send_keys
(
Keys
.
ENTER
)
sleep
(
1
)
# chrome.find_element_by_xpath(
# '//div[@class="multiple-header string_col" and text()="38443"]/ancestor-or-self::td/preceding-sibling::td/div/label/span/span').click()
# 勾选查询出的合同号并点击确定按钮
btn_div
=
chrome
.
find_element_by_xpath
(
'//span/input[@type="radio" and @value="015f0460ae99d46064e7d15e9a9cc4df2"]'
)
chrome
.
execute_script
(
"arguments[0].click();"
,
btn_div
)
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'(//button[@class="el-button el-button--primary el-button--default"])[2]'
).
click
()
sleep
(
1
)
# 输入客户名称
chrome
.
find_element_by_xpath
(
'//div[text()="客户名称 "]/following-sibling::div/div/div/div/div/div/div/div/span/span/i'
).
click
()
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'//input[@placeholder="模糊检索:客户编码,客户名称,货币码"]'
).
send_keys
(
custname
)
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'//input[@placeholder="模糊检索:客户编码,客户名称,货币码"]'
).
send_keys
(
Keys
.
ENTER
)
sleep
(
1
)
# chrome.find_element_by_xpath(
# '//div[@class="multiple-header string_col" and text()="38443"]/ancestor-or-self::td/preceding-sibling::td/div/label/span/span').click()
# 勾选查询出的合同号并点击确定按钮
btn_div
=
chrome
.
find_element_by_xpath
(
'//span/input[@type="radio" and @value="054956b6ee3b27c31cb07310caa9b3f77"]'
)
chrome
.
execute_script
(
"arguments[0].click();"
,
btn_div
)
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'(//button[@class="el-button el-button--primary el-button--default"])[2]'
).
click
()
sleep
(
1
)
# 切换到其他信息页
chrome
.
find_element_by_xpath
(
'//div[text()="其他信息"]'
).
click
()
sleep
(
1
)
# 填写配销客户名称
chrome
.
find_element_by_xpath
(
'//div[text()="配销客户名称 "]/following-sibling::div/div/div/div/div/div/div/div/span/span/i'
).
click
()
wait
.
until
(
ec
.
visibility_of_element_located
((
By
.
XPATH
,
'//input[@placeholder="模糊检索:客户编码,客商名称"]'
)))
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'//input[@placeholder="模糊检索:客户编码,客商名称"]'
).
send_keys
(
custname
)
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'//input[@placeholder="模糊检索:客户编码,客商名称"]'
).
send_keys
(
Keys
.
ENTER
)
sleep
(
1
)
btn_div
=
chrome
.
find_element_by_xpath
(
'//span/input[@type="radio" and @value="0c4d395678c596b20aa6c2a2fef3483d4"]'
)
chrome
.
execute_script
(
"arguments[0].click();"
,
btn_div
)
chrome
.
find_element_by_xpath
(
'(//button[@class="el-button el-button--primary el-button--default"])[2]'
).
click
()
sleep
(
1
)
#保存主表
chrome
.
find_element_by_xpath
(
'//span[text()="保存"]'
).
click
()
wait
.
until
(
ec
.
presence_of_element_located
((
By
.
XPATH
,
'//p[text()="保存成功"]'
)))
sleep
(
1
)
###子表信息录入###
chrome
.
find_element_by_xpath
(
'//div[text()="主体信息"]'
).
click
()
sleep
(
1
)
# 点击添加商品并输入商品编码,查询出结果
chrome
.
find_element_by_xpath
(
'//span[text()="添加商品"]'
).
click
()
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'//input[@placeholder="模糊检索:借出单号,商品名称,规格型号,批次号,序列号,原始订单类型"]'
).
send_keys
(
jctorder
)
sleep
(
0.5
)
chrome
.
find_element_by_xpath
(
'//input[@placeholder="模糊检索:借出单号,商品名称,规格型号,批次号,序列号,原始订单类型"]'
).
send_keys
(
Keys
.
ENTER
)
sleep
(
2
)
# 勾选查询出的商品并点击确定按钮
chrome
.
find_element_by_xpath
(
'//th[@class="el-table_21_column_370 multiple-column el-table-column--selection is-leaf headerCellClassName el-table__cell"]/div/label/span/span'
).
click
()
sleep
(
0.5
)
chrome
.
find_element_by_xpath
(
'(//div[@class="el-dialog__body"]/div[2]/span/button[1]/span)[6]'
).
click
()
sleep
(
3
)
# 提交
chrome
.
find_element_by_xpath
(
'//span[text()="提交"]'
).
click
()
wait
.
until
(
ec
.
visibility_of_element_located
((
By
.
XPATH
,
'(//span[text()="确定"])[22]'
)))
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'(//span[text()="确定"])[22]'
).
click
()
wait
.
until
(
ec
.
presence_of_element_located
((
By
.
XPATH
,
'//p[text()="办理成功"]'
)))
PurchaseOrder
.
closetab
(
self
)
print
(
'手术借出转销售单提交成功'
)
def
return_xstorderno
(
self
):
return
orderno4
def
button_click2
(
self
,
type
=
1
,
msg1
=
'流程结束'
):
#审批/驳回订单:type=1为审批/其余为驳回订单
wait
.
until
(
ec
.
visibility_of_element_located
((
By
.
XPATH
,
'//span[text()="审核通过"]'
)))
sleep
(
1
)
if
type
==
1
:
#审核流程
#点击审核通过
chrome
.
find_element_by_xpath
(
'//span[text()="审核通过"]'
).
click
()
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'(//span[text()="确定"])[1]'
).
click
()
locator
=
(
By
.
XPATH
,
'//textarea[@placeholder="意见留言"]'
)
wait
.
until
(
ec
.
presence_of_element_located
(
locator
))
sleep
(
0.5
)
#填写审核通过信息
chrome
.
find_element_by_xpath
(
'//textarea[@placeholder="意见留言"]'
).
send_keys
(
'审核通过'
)
sleep
(
0.5
)
#点击发送按钮
chrome
.
find_element_by_xpath
(
'//span[text()="发送"]'
).
click
()
#判断审核成功
locator
=
(
By
.
XPATH
,
'//p[text()="%s"]'
%
msg1
)
wait
.
until
(
ec
.
presence_of_element_located
(
locator
))
print
(
'订单审核成功'
)
else
:
#驳回流程
#点击驳回
chrome
.
find_element_by_xpath
(
'//span[text()="审核驳回"]'
).
click
()
locator
=
(
By
.
XPATH
,
'//textarea[@placeholder="意见留言"]'
)
wait
.
until
(
ec
.
presence_of_element_located
(
locator
))
sleep
(
0.5
)
#填写驳回信息
chrome
.
find_element_by_xpath
(
'//textarea[@placeholder="意见留言"]'
).
send_keys
(
'审核驳回'
)
sleep
(
0.5
)
#点击发送
chrome
.
find_element_by_xpath
(
'//span[text()="发送"]'
).
click
()
#判断驳回成功
locator
=
(
By
.
XPATH
,
'//p[text()="发送成功"]'
)
wait
.
until
(
ec
.
presence_of_element_located
(
locator
))
print
(
'订单驳回成功'
)
self
.
closetab
()
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
step1
=
LoginSys
()
try
:
step2_1
=
SurgicalOrder
()
step1
=
LoginSys
()
step2_2
=
PurchaseOrder
()
step2_1
=
SurgicalOrder
()
step3
=
SurgicalDispensing
()
step2_2
=
PurchaseOrder
()
step4
=
SurgicalLending
()
step3
=
SurgicalDispensing
()
step5_1
=
Outstore
()
step4
=
SurgicalLending
()
step5_2
=
Outstore1
()
step5_1
=
Outstore
()
step6
=
SurgicalReturn
()
step5_2
=
Outstore1
()
step1
.
loginsys
(
SIT_URL
,
usr2
,
pwd2
)
step6
=
SurgicalReturn
()
step2_1
.
data_add_surgical
()
step7_1
=
Instore1
()
step2_2
.
button_click1
()
step7_2
=
Instore
()
qltorder
=
step2_1
.
return_qltorder
()
step8
=
SurgicalLendingSale
()
step3
.
dispensing
(
qltorder
)
step1
.
loginsys
(
SIT_URL
,
usr2
,
pwd2
)
step4
.
lending
(
qltorder
)
step2_1
.
data_add_surgical
()
step4
.
switch_loggin
(
usr1
,
pwd1
)
step2_2
.
button_click1
()
step4
.
query_click
(
menu_name
=
'手术借出单'
,
orderno
=
qltorder
,
qltorder
=
step2_1
.
return_qltorder
()
el
=
'vxe-body--column col_19 col--center col--ellipsis dw-click-cell'
,
step3
.
dispensing
(
qltorder
)
qrcond
=
'请领单号'
)
step4
.
lending
(
qltorder
)
jctorder
=
step4
.
return_jctorder
()
step4
.
switch_loggin
(
usr1
,
pwd1
)
step4
.
button_click2
()
step4
.
query_click
(
menu_name
=
'手术借出单'
,
orderno
=
qltorder
,
step4
.
switch_loggin
(
usr4
,
pwd4
)
el
=
'vxe-body--column col_19 col--center col--ellipsis dw-click-cell'
,
step5_1
.
deliver_goods
(
jctorder
)
# 仓库发货
qrcond
=
'请领单号'
)
step5_1
.
picking_goods
(
jctorder
)
# 仓库拣货
jctorder
=
step4
.
return_jctorder
()
step5_1
.
switch_loggin
(
usr5
,
pwd5
)
step4
.
button_click2
()
step5_2
.
outbound_review1
(
jctorder
,
type
=
3
)
# 出库复核
step4
.
switch_loggin
(
usr4
,
pwd4
)
step5_1
.
switch_loggin
(
usr2
,
pwd2
)
step5_1
.
deliver_goods
(
jctorder
)
# 仓库发货
step6
.
data_add_surgicalreturn
(
jctorder
)
#新增手术还回收货
step5_1
.
picking_goods
(
jctorder
)
# 仓库拣货
hhshtorder
=
step6
.
return_hhshtorder
()
step5_1
.
switch_loggin
(
usr5
,
pwd5
)
\ No newline at end of file
step5_2
.
outbound_review1
(
jctorder
,
type
=
3
)
# 出库复核
step5_1
.
switch_loggin
(
usr2
,
pwd2
)
step6
.
data_add_surgicalreturn
(
jctorder
)
#新增手术还回收货
hhshtorder
=
step6
.
return_hhshtorder
()
step7_1
.
switch_loggin
(
usr5
,
pwd5
)
step7_1
.
goods_check
(
hhshtorder
,
type
=
3
)
#仓库验收
hhtorderno
=
step7_1
.
return_hhtorderno
()
step7_1
.
switch_loggin
(
usr4
,
pwd4
)
step7_2
.
goods_grounding
(
hhtorderno
)
#仓库上架
# step8.data_add_surgicallendingsale(jctorder)#新建销售单
# xstorderno = step8.return_xstorderno()#返回销售单号
# step8.switch_loggin(usr3,pwd3)
# step8.query_click(menu_name='手术借出转销售', orderno=xstorderno,
# el='vxe-body--column col_19 col--center col--ellipsis dw-click-cell',
# qrcond='销售订单号')#进入表单视图
# step8.button_click2()#审核订单
except
(
Exception
,
AssertionError
)
as
e
:
step9
=
ExceptionHandling
()
traceback
.
print_exc
()
step9
.
handle
(
errmsg6
,
e
)
finally
:
chrome
.
quit
()
\ No newline at end of file
testcase/test_scene6/test_scene6_mainflow1.py
0 → 100644
View file @
bb39e3ae
from
testcase.test_scene6.scene6_mainflow
import
*
if
__name__
==
'__main__'
:
try
:
# step1 = LoginSys()
step2_1
=
SurgicalOrder
()
step2_2
=
PurchaseOrder
()
step3
=
SurgicalDispensing
()
step4
=
SurgicalLending
()
step5_1
=
Outstore
()
step5_2
=
Outstore1
()
step6
=
SurgicalReturn
()
step7_1
=
Instore1
()
step7_2
=
Instore
()
step8
=
SurgicalLendingSale
()
# step1.loginsys(SIT_URL, usr2, pwd2)
step2_2
.
switch_loggin
(
usr2
,
pwd2
)
step2_1
.
data_add_surgical
()
step2_2
.
button_click1
()
qltorder
=
step2_1
.
return_qltorder
()
step3
.
dispensing
(
qltorder
)
step4
.
lending
(
qltorder
)
step4
.
switch_loggin
(
usr1
,
pwd1
)
step4
.
query_click
(
menu_name
=
'手术借出单'
,
orderno
=
qltorder
,
el
=
'vxe-body--column col_19 col--center col--ellipsis dw-click-cell'
,
qrcond
=
'请领单号'
)
jctorder
=
step4
.
return_jctorder
()
step4
.
button_click2
()
step4
.
switch_loggin
(
usr4
,
pwd4
)
step5_1
.
deliver_goods
(
jctorder
)
# 仓库发货
step5_1
.
picking_goods
(
jctorder
)
# 仓库拣货
step5_1
.
switch_loggin
(
usr5
,
pwd5
)
step5_2
.
outbound_review1
(
jctorder
,
type
=
3
)
# 出库复核
step5_1
.
switch_loggin
(
usr2
,
pwd2
)
step6
.
data_add_surgicalreturn
(
jctorder
)
#新增手术还回收货
hhshtorder
=
step6
.
return_hhshtorder
()
step7_1
.
switch_loggin
(
usr5
,
pwd5
)
step7_1
.
goods_check
(
hhshtorder
,
type
=
3
)
#仓库验收
step7_1
.
switch_loggin
(
usr4
,
pwd4
)
step7_2
.
goods_grounding
(
hhshtorder
)
#仓库上架
# step8.data_add_surgicallendingsale(jctorder)#新建销售单
# xstorderno = step8.return_xstorderno()#返回销售单号
# step8.switch_loggin(usr3,pwd3)
# step8.query_click(menu_name='手术借出转销售', orderno=xstorderno,
# el='vxe-body--column col_19 col--center col--ellipsis dw-click-cell',
# qrcond='销售订单号')#进入表单视图
# step8.button_click2()#审核订单
except
(
Exception
,
AssertionError
)
as
e
:
step9
=
ExceptionHandling
()
traceback
.
print_exc
()
step9
.
handle
(
errmsg6
,
e
)
testcase/test_scene6/test_scene6_mainflow2.py
0 → 100644
View file @
bb39e3ae
from
testcase.test_scene6.scene6_mainflow
import
*
if
__name__
==
'__main__'
:
try
:
# step1 = LoginSys()
step2_1
=
SurgicalOrder
()
step2_2
=
PurchaseOrder
()
step3
=
SurgicalDispensing
()
step4
=
SurgicalLending
()
step5_1
=
Outstore
()
step5_2
=
Outstore1
()
step6
=
SurgicalReturn
()
step7_1
=
Instore1
()
step7_2
=
Instore
()
step8
=
SurgicalLendingSale
()
# step1.loginsys(SIT_URL, usr2, pwd2)
step2_2
.
switch_loggin
(
usr2
,
pwd2
)
step2_1
.
data_add_surgical
()
step2_2
.
button_click1
()
qltorder
=
step2_1
.
return_qltorder
()
step3
.
dispensing
(
qltorder
)
step4
.
lending
(
qltorder
)
step4
.
switch_loggin
(
usr1
,
pwd1
)
step4
.
query_click
(
menu_name
=
'手术借出单'
,
orderno
=
qltorder
,
el
=
'vxe-body--column col_19 col--center col--ellipsis dw-click-cell'
,
qrcond
=
'请领单号'
)
jctorder
=
step4
.
return_jctorder
()
step4
.
button_click2
()
step4
.
switch_loggin
(
usr4
,
pwd4
)
step5_1
.
deliver_goods
(
jctorder
)
# 仓库发货
step5_1
.
picking_goods
(
jctorder
)
# 仓库拣货
step5_1
.
switch_loggin
(
usr5
,
pwd5
)
step5_2
.
outbound_review1
(
jctorder
,
type
=
3
)
# 出库复核
step5_1
.
switch_loggin
(
usr2
,
pwd2
)
# step6.data_add_surgicalreturn(jctorder)#新增手术还回收货
# hhshtorder = step6.return_hhshtorder()
# step7_1.switch_loggin(usr5,pwd5)
# step7_1.goods_check(hhshtorder,type=3)#仓库验收
# step7_1.switch_loggin(usr4,pwd4)
# step7_2.goods_grounding(hhshtorder)#仓库上架
step8
.
data_add_surgicallendingsale
(
jctorder
)
#新建销售单
xstorderno
=
step8
.
return_xstorderno
()
#返回销售单号
step8
.
switch_loggin
(
usr3
,
pwd3
)
step8
.
query_click
(
menu_name
=
'手术借出转销售'
,
orderno
=
xstorderno
,
el
=
'vxe-body--column col_19 col--center col--ellipsis dw-click-cell'
,
qrcond
=
'销售订单号'
)
#进入表单视图
step8
.
button_click2
()
#审核订单
except
(
Exception
,
AssertionError
)
as
e
:
step9
=
ExceptionHandling
()
traceback
.
print_exc
()
step9
.
handle
(
errmsg6
,
e
)
finally
:
chrome
.
quit
()
\ No newline at end of file
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