Commit 20b9b7f2 authored by 章 登恒's avatar 章 登恒
Browse files

commit

parent 2df0b31a
......@@ -168,15 +168,15 @@ class PurchaseOrder():###普通采购单界面操作
###填写数量价格###
for i in range(1):
wait.until(ec.visibility_of_element_located((By.XPATH,'(//td[@colid="col_164" and @f="F_QUANTITY_ORD" and @i=%s])'%i)))
wait.until(ec.visibility_of_element_located((By.XPATH,'(//td[@colid="col_165" and @f="F_QUANTITY_ORD" and @i=%s])'%i)))
#定位数量框并输入数量
element = chrome.find_element_by_xpath('(//td[@colid="col_164" and @f="F_QUANTITY_ORD" and @i=%s])'%i)
element = chrome.find_element_by_xpath('(//td[@colid="col_165" and @f="F_QUANTITY_ORD" and @i=%s])'%i)
chrome.execute_script("arguments[0].click();", element)
sleep(0.5)
chrome.find_element_by_class_name('awsui-input-number-right').send_keys('1')
sleep(1)
#点击其它地方让数量框失焦,让数量真正填入数量框(平台设计如此,不用纠结为啥要此步)
chrome.find_element_by_xpath('(//td[@colid="col_171" and @f="F_PURUNIT_TXT" and @i=%s])' % i).click()
chrome.find_element_by_xpath('(//td[@colid="col_172" and @f="F_PURUNIT_TXT" and @i=%s])' % i).click()
sleep(1)
def return_pchno(self):#返回采购单号
return orderno1
......
......@@ -157,15 +157,15 @@ class QuickPurchase():#快速采购单界面操作
###填写数量价格###
for i in range(1):
wait.until(ec.visibility_of_element_located((By.XPATH,'(//td[@colid="col_165" and @f="F_QUANTITY_ORD" and @i=%s])'%i)))
wait.until(ec.visibility_of_element_located((By.XPATH,'(//td[@colid="col_166" and @f="F_QUANTITY_ORD" and @i=%s])'%i)))
#定位数量框并输入数量
element = chrome.find_element_by_xpath('(//td[@colid="col_165" and @f="F_QUANTITY_ORD" and @i=%s])'%i)
element = chrome.find_element_by_xpath('(//td[@colid="col_166" and @f="F_QUANTITY_ORD" and @i=%s])'%i)
chrome.execute_script("arguments[0].click();", element)
sleep(0.5)
chrome.find_element_by_class_name('awsui-input-number-right').send_keys('1')
sleep(1)
#点击其它地方让数量框失焦,让数量真正填入数量框(平台设计如此,不用纠结为啥要此步)
chrome.find_element_by_xpath('(//td[@colid="col_172" and @f="F_PURUNIT_TXT" and @i=%s])' % i).click()
chrome.find_element_by_xpath('(//td[@colid="col_173" and @f="F_PURUNIT_TXT" and @i=%s])' % i).click()
sleep(1)
def return_owtorder(self):#返回采购单号
......@@ -229,6 +229,6 @@ if __name__ == '__main__':
traceback.print_exc()
step6.handle(errmsg3,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