def test_1dc_delete_planting(self): base01.login(base01.planting) try: base01.delete_batch_planting(base01.sku) print 'test_1dc_delete_batch_planting test pass' except: print 'test_1dc_delete_batch_planting test fail' time.sleep(3) try: base01.delete_goods_planting(base01.sku) print 'test_1dc_delete_goods_planting test pass' except: print 'test_1dc_delete_goods_planting test fail' base01.driver.find_element_by_xpath( '//*[@id="passwordFrom"]/div/ul/li[2]/a').click() # 退出种植系统
def test_1db_delete_store(self): base01.login(base01.store) try: base01.delete_stock_store(base01.sku) #删除进货登记 print 'test_1db_delete_stock_store test pass' except: print 'test_1db_delete_stock_store test fail' time.sleep(2) try: base01.delete_goods_store(base01.sku) #删除产品 print 'test_1db_delete_goods_store test pass' except: print 'test_1db_delete_goods_store test fail' time.sleep(2) try: base01.delete_supplier_store(base01.supplier) #删除供应商 print 'test_1db_delete_supplier_store test pass' except: print 'test_1db_delete_supplier_store test fail' base01.driver.find_element_by_xpath( '//*[@id="passwordFrom"]/div/ul/li[2]/a').click() # 退出商超系统
def test_1bd(self): try: base01.add_SalesRecord_store(base01.sku) print 'test_1bd_add_SalesRecord1 test pass' except: print 'test_1bd_add_SalesRecord1 test fail' time.sleep(2) code = base01.driver.find_element_by_xpath( '//*[@id="tables"]/tbody/tr[1]/td[2]').text # 获取出库单号 base01.driver.find_element_by_xpath( '//*[@id="passwordFrom"]/div/ul/li[2]/a').click() # 退出商超系统 try: base01.login(base01.supermarket) #登录超市系统 print 'test_1bd_login test pass' except: print 'test_1bd_login test fail' try: base01.stock_registration_supermarket(code) print 'test_1bd_stock_registration_supermarket test pass' except: print 'test_1bd_stock_registration_supermarket test pass' time.sleep(3)
def test_1ad(self): try: base01.add_SalesRecord_planting('sku00000/000') print 'test_1ad_add_SalesRecord_planting test pass' except: print 'test_1ad_add_SalesRecord_planting test fail' code = base01.driver.find_element_by_xpath( '//*[@id="tables"]/tbody/tr[1]/td[2]').text # 获取出库单号 base01.driver.find_element_by_xpath( '//*[@id="passwordFrom"]/div/ul/li[2]/a').click() # 退出种植系统 try: base01.login(base01.store) #登录商超系统 print 'test_1ad_login test pass' except: print 'test_1ad_login test fail' try: base01.stock_registration_store(code) print 'test_1ad_stock_registration_store test pass' except: print 'test_1ad_stock_registration_store test pass' time.sleep(3)
def test_1aa_login(self): try: base01.login(base01.planting) print 'test_1aa_login test pass' except: print 'test_1aa_login test fail'