Commit a160c685 authored by 章 登恒's avatar 章 登恒
Browse files

commit

parent 6f5b49b2
......@@ -34,7 +34,7 @@ from public.tools import *
chrome =webdriver.Chrome()
chrome.maximize_window()
wait = WebDriverWait(chrome,20,poll_frequency=0.2)
wait = WebDriverWait(chrome,30,poll_frequency=0.2)
SIT_URL = 'http://scdev.cmic.com.cn:8088/beta/'#SIT环境地址
......
......@@ -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','要货申请订单号')
step4.button_click2(msg1='发送成功')
step2_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()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment