Best Python code snippet using robotframework-appiumlibrary_python
caigou_business.py
Source:caigou_business.py
...15 # self.app_xsdd=public.click_app(app="éå®è®¢å")16 self.fe=public.get_by_local17 def quit_driver(self):18 self.driver.quit()19 def switch_to_context(self,s):20 #s=0 åçï¼s=1 H521 time.sleep(2) # å 为æ æ³çæ§ï¼å ä¸web页é¢å è½½æ¯è¾æ
¢æ以çå¾
æ¶é´æ¯è¾é¿22 # è·å页é¢ææçä¸ä¸æ23 cons = self.driver.contexts #['NATIVE_APP', 'WEBVIEW_com.kingdee.jdy', 'WEBVIEW_com.android.launcher2']24 #self.lg.info("è·å页é¢ææçä¸ä¸æ:%s" % cons)25 # è·åå½åçªå£çä¸ä¸æ26 self.driver.switch_to.context(cons[s])27 self.lg.info("è·åå½åçªå£çä¸ä¸æ(åæ¢å):%s" % self.driver.current_context)28 def get_purchase_order(self):29 time.sleep(5)30 #åéè´å31 self.lg.info("ç¹å»éè´åºç¨")32 self.app(app="éè´å
¥åº")33 self.switch_to_context(s=1)34 self.lg.info("ç¹å»æ°å¢")35 self.fe.get_element('add',meg="caigou_element").click()36 self.switch_to_context(s=1)37 # print (driver.page_source)38 self.lg.info("éæ©æ²³æºä¾åºå")39 self.fe.get_element('add_supplier',meg="caigou_element").send_keys(u"æ²³æºä¾åºå")40 #select_supplier41 self.switch_to_context(s=1)42 self.fe.get_element('select_supplier',meg="caigou_element").click()43 self.switch_to_context(s=1)44 self.lg.info("æ·»å åå")45 self.fe.get_element('add_goods',meg="caigou_element").click()46 self.switch_to_context(s=1)47 self.lg.info("ç¹å»éæ©ä»åº")48 self.fe.get_element('h1_warehouse',meg="caigou_element").click()49 self.switch_to_context(s=1)50 self.fe.get_element('search_warehouse_baihuo',meg="caigou_element").click()51 self.switch_to_context(s=1)52 self.lg.info("æç´¢'çè¾¾'åå")53 self.fe.get_element('search_box',meg="caigou_element").send_keys(u"çè¾¾").send_keys(Keys.ENTER)54 self.switch_to_context(s=1)55 self.lg.info("ç¡®å®åå")56 self.fe.get_element('select_goods',meg="caigou_element").click()57 self.switch_to_context(s=1)58 self.lg.info("è¾å
¥ååæ°éï¼10")59 self.fe.get_element('goods_quantity',meg="caigou_element").clear().send_keys(10)60 self.lg.info("ç¡®å®")61 self.fe.get_element('confirm',meg="caigou_element").click()62 self.switch_to_context(s=1)63 self.lg.info("ä¸å")64 self.fe.get_element('confirm_select',meg="caigou_element").click()65 self.switch_to_context(s=1)66 self.lg.info("ç»ç®")67 self.fe.get_element('Settlement',meg="caigou_element").click()68 self.switch_to_context(s=1)69 self.lg.info("è¾å
¥è´¦æ·ï¼å¡«åéé¢")70 self.fe.get_element('pay',meg="caigou_element").click()71 self.fe.get_element('account',meg="caigou_element").click()72 self.switch_to_context(s=1)73 self.fe.get_element('select_account',meg="caigou_element").click()74 self.switch_to_context(s=1)75 self.fe.get_element('pay_for',meg="caigou_element").send_keys(50)76 self.switch_to_context(s=1)77 self.fe.get_element('show_more',meg="caigou_element").click()78 time.sleep(3)79 self.lg.info("ä¸å")80 self.fe.get_element('Place_order',meg="caigou_element").click()81 time.sleep(2)82 self.lg.info("跳转å°éè´å表ï¼ææ¥æï¼å®¡æ ¸ç¶æçéåæçå¼ååæ®ï¼å¹¶å®¡æ ¸")83 self.switch_to_context(s=1)84 self.fe.get_element('purinbound_list',meg="caigou_element").click()85 self.switch_to_context(s=1)86 self.fe.get_element('select_date',meg="caigou_element").click()87 self.switch_to_context(s=1)88 self.fe.get_element('date_today',meg="caigou_element").click()89 self.switch_to_context(s=1)90 self.fe.get_element('purinbound_staus',meg="caigou_element").click()91 self.switch_to_context(s=1)92 self.fe.get_element('unaudited',meg="caigou_element").click()93 self.switch_to_context(s=1)94 #æå°è®¢åç¼å·95 self.lg.info("æå°è®¢åç¼å·:%s" % self.fe.get_element('billno',meg="caigou_element").text)96 #print(self.fe.get_element('billno',meg="caigou_element").text)97 self.fe.get_element('billno',meg="caigou_element").click()98 self.switch_to_context(s=1)99 #å®¡æ ¸åæ®100 self.fe.get_element('audit_button',meg="caigou_element").click()101 self.switch_to_context(s=0)102 self.fe.get_element("close",meg="caigou_element").click()103 def get_sale_order(self):104 time.sleep(5)105 self.lg.info("ç¹å»éå®è®¢å")106 self.app(app="éå®è®¢å")107 self.switch_to_context(s=1)108 self.lg.info("æ°å¢éå®åï¼éæ©å®¢æ·-åå-éæ©ä»åº-è¾å
¥æ°é-ç¡®å®ä¸å")109 self.fe.get_element('add',meg="saleOrder_element").click()110 self.switch_to_context(s=1)111 self.fe.get_element('coustmer_botton',meg="saleOrder_element").click()112 self.switch_to_context(s=1)113 self.fe.get_element('search_coustmer_box',meg="saleOrder_element").send_keys(u"å为")114 time.sleep(3)115 self.fe.get_element('select_coustmer',meg="saleOrder_element").click()116 self.switch_to_context(s=1)117 self.fe.get_element('salesman_button',meg="saleOrder_element").click()118 self.switch_to_context(s=1)119 self.fe.get_element('select_salesman_baili',meg="saleOrder_element").click()120 self.switch_to_context(s=1)121 self.fe.get_element('add_goods',meg="saleOrder_element").click()122 self.switch_to_context(s=1)123 self.fe.get_element('goods_group_lingshi',meg="saleOrder_element").click()124 self.switch_to_context(s=1)125 self.fe.get_element('jia',meg="saleOrder_element").click()126 self.switch_to_context(s=1)127 self.fe.get_element('goods_showmore',meg="saleOrder_element").click()128 self.switch_to_context(s=1)129 self.fe.get_element('select_stock',meg="saleOrder_element").click()130 self.switch_to_context(s=1)131 self.fe.get_element('select_stock_baihuo',meg="saleOrder_element").click()132 self.switch_to_context(s=1)133 self.fe.get_element('good_quantity',meg="saleOrder_element").clear().send_keys(5)134 self.fe.get_element('discont2',meg="saleOrder_element").click()135 self.fe.get_element('discont2_money',meg="saleOrder_element").send_keys(3)136 self.fe.get_element('confirm',meg="saleOrder_element").click()137 self.switch_to_context(s=1)138 self.fe.get_element('confirm_select',meg="saleOrder_element").click()139 self.switch_to_context(s=1)140 self.fe.get_element('Settlement',meg="saleOrder_element").click()141 self.switch_to_context(s=1)142 self.fe.get_element('deposit_button',meg="saleOrder_element").click()143 self.switch_to_context(s=1)144 self.fe.get_element('account',meg="saleOrder_element").click()145 self.switch_to_context(s=1)146 self.fe.get_element('select_account',meg="saleOrder_element").click()147 self.switch_to_context(s=1)148 self.fe.get_element('deposit_pay',meg="saleOrder_element").send_keys(47)149 self.fe.get_element('pay_showmore',meg="saleOrder_element").click()150 self.fe.get_element('place_saleorder',meg="saleOrder_element").click()151 #ä¸æ¨152 self.lg.info("éå®è®¢åä¸æ¨æéå®åºåºå")153 self.switch_to_context(s=1)154 self.fe.get_element('saleOrder_list',meg="saleOrder_element").click()155 self.switch_to_context(s=1)156 self.fe.get_element('select_date',meg="saleOrder_element").click()157 self.switch_to_context(s=1)158 self.fe.get_element('date_today',meg="saleOrder_element").click()159 self.switch_to_context(s=1)160 self.fe.get_element('purinbound_staus',meg="saleOrder_element").click()161 self.switch_to_context(s=1)162 T=self.fe.get_element('unaudited',meg="saleOrder_element")163 self.lg.info("æå°æé®å称:%s" % T.text)164 T.click()165 # get_by_local.get_element('unaudited',meg="saleOrder_element").click()166 self.switch_to_context(s=1)167 self.fe.get_element('saleorder_billno',meg="saleOrder_element").click()168 self.switch_to_context(s=1)169 self.fe.get_element('saleorder_audit_button',meg="saleOrder_element").click()170 time.sleep(5)171 self.fe.get_element('out_warehousr',meg="saleOrder_element").click()172 #åºåº173 self.lg.info("å®¡æ ¸åç订ååºåº")174 self.switch_to_context(s=1)175 self.fe.get_element('Settlement',meg="salOutbound_element").click()176 self.switch_to_context(s=1)177 self.fe.get_element('collection_button',meg="salOutbound_element").click()178 self.switch_to_context(s=1)179 self.fe.get_element('account',meg="salOutbound_element").click()180 self.switch_to_context(s=1)181 self.fe.get_element('select_account',meg="salOutbound_element").click()182 self.switch_to_context(s=1)183 self.fe.get_element('collection',meg="salOutbound_element").send_keys(47)184 self.switch_to_context(s=1)185 self.fe.get_element('place_saleorder',meg="salOutbound_element").click()186 self.switch_to_context(s=1)187 self.fe.get_element('saleOrder_list',meg="salOutbound_element").click()188 self.switch_to_context(s=1)189 self.fe.get_element('select_date',meg="salOutbound_element").click()190 self.switch_to_context(s=1)191 self.fe.get_element('date_today',meg="salOutbound_element").click()192 self.switch_to_context(s=1)193 self.fe.get_element('purinbound_staus',meg="salOutbound_element").click()194 self.switch_to_context(s=1)195 self.fe.get_element('unaudited',meg="salOutbound_element").click()196 self.switch_to_context(s=1)197 time.sleep(3)198 self.fe.get_element('saleorder_billno',meg="salOutbound_element").click()199 self.switch_to_context(s=1)200 self.fe.get_element('saleorder_audit_button',meg="salOutbound_element").click()...
testApp.py
Source:testApp.py
...52 swipe_left()53 elif direction == 'right':54 swipe_right()55# å¯å¨åæ°éå¢å desired_caps["chromedriverExecutable"] = 'D:\\code\\softspace\\66-68\\chromedriver.exe'56def switch_to_context():57 time.sleep(2) # å 为æ æ³çæ§ï¼å ä¸web页é¢å è½½æ¯è¾æ
¢æ以çå¾
æ¶é´æ¯è¾é¿58 # è·å页é¢ææçä¸ä¸æ59 cons = driver.contexts #['NATIVE_APP', 'WEBVIEW_unknown', 'WEBVIEW_stetho_com.kingdee.jdy']60 print(cons)61 # è·åå½åçªå£çä¸ä¸æ62 print(driver.current_context)63 #driver.switch_to.context("NATIVE_APP")64 driver.switch_to.context(cons[2])65 print(driver.current_context)66driver = get_driver()67get_by_local = FindElement(driver)68get_by_local.get_element("agree").click()69get_by_local.get_element("Get_permission").click()70get_by_local.get_element("Get_permission").click()71swipe_on('left')72swipe_on('left')73swipe_on('left')74swipe_on('right')75# def login():76 #ç»å½77get_by_local.get_element('login_button_one').click()78get_by_local.get_element('username').send_keys("kingdeetest5854")79get_by_local.get_element('password').send_keys("a1234567")80get_by_local.get_element('login_button').click()81#5854éæ©è´¦å¥82zt=driver.find_elements_by_id("com.kingdee.jdy:id/iv_fdb_status")83zt[5].click()84driver.find_element_by_id("com.kingdee.jdy:id/tv_fdb_enter").click()85# åºç¨86t=driver.find_elements_by_id("com.kingdee.jdy:id/footer_menu_item_icon")87t[1].click()88time.sleep(3)89#éæ©åéè´åºåºå90e=driver.find_elements_by_id("com.kingdee.jdy:id/ic_app_name")91print(e)92for ii in e:93 print(ii.text)94# e[10].click()95# # login()96#97# #åéè´å98# # driver.launch_app()99#100# switch_to_context()101#102# get_by_local.get_element('add_goods',meg="caigou_element").click()103# switch_to_context()104# get_by_local.get_element('h1_warehouse',meg="caigou_element").click()105# switch_to_context()106# get_by_local.get_element('search_warehouse_baihuo',meg="caigou_element").click()107# switch_to_context()108# get_by_local.get_element('search_box',meg="caigou_element").send_keys(u"çè¾¾").send_keys(Keys.ENTER)109# switch_to_context()110# get_by_local.get_element('select_goods',meg="caigou_element").click()111# switch_to_context()112# get_by_local.get_element('goods_quantity',meg="caigou_element").clear().send_keys(10)113#114# get_by_local.get_element('confirm',meg="caigou_element").click()115# switch_to_context()116# get_by_local.get_element('confirm_select',meg="caigou_element").click()117# switch_to_context()118# get_by_local.get_element('Settlement',meg="caigou_element").click()119# switch_to_context()120# get_by_local.get_element('pay',meg="caigou_element").click()121# get_by_local.get_element('account',meg="caigou_element").click()122# switch_to_context()123# get_by_local.get_element('select_account',meg="caigou_element").click()124# switch_to_context()125# get_by_local.get_element('pay_for',meg="caigou_element").send_keys(50)126#127#128# switch_to_context()129# get_by_local.get_element('show_more',meg="caigou_element").click()130# time.sleep(3)131# print (driver.page_source)132# print(driver.contexts)133#134# # get_by_local.get_element('remake',meg="caigou_element").send_keys("test an order...")135#136#137# print(driver.contexts)138# # ActionChains(driver).send_keys(u"test an order.").perform()139# # get_by_local.get_element('remake',meg="caigou_element").send_keys(u"test an order.")140# #driver.switch_to.active_element.send_keys(u"test an order.")141#142# get_by_local.get_element('Place_order',meg="caigou_element").click()143# driver.get_screenshot_as_file('./data/test.png')144# switch_to_context()145# get_by_local.get_element('purinbound_list',meg="caigou_element").click()146# switch_to_context()147# get_by_local.get_element('select_date',meg="caigou_element").click()148# switch_to_context()149# get_by_local.get_element('date_today',meg="caigou_element").click()150# switch_to_context()151# get_by_local.get_element('purinbound_staus',meg="caigou_element").click()152# switch_to_context()153# get_by_local.get_element('unaudited',meg="caigou_element").click()154# switch_to_context()155# #æå°è®¢åç¼å·156# print(get_by_local.get_element('billno',meg="caigou_element").text)157#158# get_by_local.get_element('billno',meg="caigou_element").click()159# switch_to_context()160# #å®¡æ ¸åæ®161# get_by_local.get_element('audit_button',meg="caigou_element").click()162#163# driver.get_screenshot_as_file('./data/test2.png')164#è¿å两次页é¢165#éå®è®¢åå®¡æ ¸åä¸æ¨éå®åºåºå166# e=driver.find_elements_by_id("com.kingdee.jdy:id/ic_app_name")167# print(e)168# for ii in e:169# print(ii.text)170e[0].click()171switch_to_context()172get_by_local.get_element('add',meg="saleOrder_element").click()173switch_to_context()174get_by_local.get_element('coustmer_botton',meg="saleOrder_element").click()175switch_to_context()176get_by_local.get_element('search_coustmer_box',meg="saleOrder_element").send_keys(u"å为")177time.sleep(3)178get_by_local.get_element('select_coustmer',meg="saleOrder_element").click()179switch_to_context()180get_by_local.get_element('salesman_button',meg="saleOrder_element").click()181switch_to_context()182get_by_local.get_element('select_salesman_baili',meg="saleOrder_element").click()183switch_to_context()184get_by_local.get_element('add_goods',meg="saleOrder_element").click()185switch_to_context()186get_by_local.get_element('goods_group_lingshi',meg="saleOrder_element").click()187switch_to_context()188get_by_local.get_element('jia',meg="saleOrder_element").click()189switch_to_context()190get_by_local.get_element('goods_showmore',meg="saleOrder_element").click()191switch_to_context()192get_by_local.get_element('select_stock',meg="saleOrder_element").click()193switch_to_context()194get_by_local.get_element('select_stock_baihuo',meg="saleOrder_element").click()195switch_to_context()196get_by_local.get_element('good_quantity',meg="saleOrder_element").clear().send_keys(5)197get_by_local.get_element('discont2',meg="saleOrder_element").click()198get_by_local.get_element('discont2_money',meg="saleOrder_element").send_keys(3)199get_by_local.get_element('confirm',meg="saleOrder_element").click()200switch_to_context()201get_by_local.get_element('confirm_select',meg="saleOrder_element").click()202switch_to_context()203get_by_local.get_element('Settlement',meg="saleOrder_element").click()204switch_to_context()205get_by_local.get_element('deposit_button',meg="saleOrder_element").click()206switch_to_context()207get_by_local.get_element('account',meg="saleOrder_element").click()208switch_to_context()209get_by_local.get_element('select_account',meg="saleOrder_element").click()210switch_to_context()211get_by_local.get_element('deposit_pay',meg="saleOrder_element").send_keys(47)212get_by_local.get_element('pay_showmore',meg="saleOrder_element").click()213get_by_local.get_element('place_saleorder',meg="saleOrder_element").click()214#ä¸æ¨215switch_to_context()216get_by_local.get_element('saleOrder_list',meg="saleOrder_element").click()217switch_to_context()218get_by_local.get_element('select_date',meg="saleOrder_element").click()219switch_to_context()220get_by_local.get_element('date_today',meg="saleOrder_element").click()221switch_to_context()222get_by_local.get_element('purinbound_staus',meg="saleOrder_element").click()223switch_to_context()224T=get_by_local.get_element('unaudited',meg="saleOrder_element")225print(T.text)226T.click()227# get_by_local.get_element('unaudited',meg="saleOrder_element").click()228switch_to_context()229get_by_local.get_element('saleorder_billno',meg="saleOrder_element").click()230switch_to_context()231get_by_local.get_element('saleorder_audit_button',meg="saleOrder_element").click()232time.sleep(5)233get_by_local.get_element('out_warehousr',meg="saleOrder_element").click()234#åºåº235switch_to_context()236get_by_local.get_element('Settlement',meg="salOutbound_element").click()237switch_to_context()238get_by_local.get_element('collection_button',meg="salOutbound_element").click()239switch_to_context()240get_by_local.get_element('account',meg="salOutbound_element").click()241switch_to_context()242get_by_local.get_element('select_account',meg="salOutbound_element").click()243switch_to_context()244get_by_local.get_element('collection',meg="salOutbound_element").send_keys(47)245switch_to_context()246get_by_local.get_element('place_saleorder',meg="salOutbound_element").click()247switch_to_context()248get_by_local.get_element('saleOrder_list',meg="salOutbound_element").click()249switch_to_context()250get_by_local.get_element('select_date',meg="salOutbound_element").click()251switch_to_context()252get_by_local.get_element('date_today',meg="salOutbound_element").click()253switch_to_context()254get_by_local.get_element('purinbound_staus',meg="salOutbound_element").click()255switch_to_context()256get_by_local.get_element('unaudited',meg="salOutbound_element").click()257switch_to_context()258get_by_local.get_element('saleorder_billno',meg="salOutbound_element").click()259switch_to_context()260get_by_local.get_element('saleorder_audit_button',meg="salOutbound_element").click()...
xiaoshou_business.py
Source:xiaoshou_business.py
...35 # swipe_left()36 # elif direction == 'right':37 # swipe_right()38 # å¯å¨åæ°éå¢å desired_caps["chromedriverExecutable"] = 'D:\\code\\softspace\\66-68\\chromedriver.exe'39 def switch_to_context(self):40 time.sleep(2) # å 为æ æ³çæ§ï¼å ä¸web页é¢å è½½æ¯è¾æ
¢æ以çå¾
æ¶é´æ¯è¾é¿41 # è·å页é¢ææçä¸ä¸æ42 cons = self.driver.contexts #['NATIVE_APP', 'WEBVIEW_com.kingdee.jdy', 'WEBVIEW_com.android.launcher2']43 print(cons)44 # è·åå½åçªå£çä¸ä¸æ45 print(self.driver.current_context)46 #driver.switch_to.context("NATIVE_APP")47 self.driver.switch_to.context(cons[2])48 print(self.driver.current_context)49 def get_purchase_order(self):50 self.get_by_local.get_element("agree").click()51 try:52 self.get_by_local.get_element("Get_permission").click()53 self.get_by_local.get_element("Get_permission").click()54 except:55 print("è·³è¿è·åæé")56 #æ»å¨57 self.swipe_left()58 self.swipe_left()59 self.swipe_left()60 self.swipe_right()61 #ç»å½62 self.get_by_local.get_element('login_button_one').click()63 self.get_by_local.get_element('username').send_keys("kingdeetest5854")64 self.get_by_local.get_element('password').send_keys("a1234567")65 self.get_by_local.get_element('login_button').click()66 #5854éæ©è´¦å¥67 zhangtao=self.driver.find_elements_by_id("com.kingdee.jdy:id/tv_fdb_company_name")68 for zt in zhangtao:69 print(zt.text)70 if zt.text=="AUTO_TEST":71 zt.click()72 else:73 print("ä¸æ¯AUTO_TESTè¿ä¸ªè´¦å¥")74 self.driver.find_element_by_id("com.kingdee.jdy:id/tv_fdb_enter").click()75 # åºç¨76 t=self.driver.find_elements_by_id("com.kingdee.jdy:id/footer_menu_item_icon")77 t[1].click()78 time.sleep(3)79 #éæ©åéè´åºåºå80 e=self.driver.find_elements_by_id("com.kingdee.jdy:id/ic_app_name")81 print(e)82 for ii in e:83 print(ii.text)84 e[10].click()85 # login()86 time.sleep(5)87 #åéè´å88 self.switch_to_context()89 self.get_by_local.get_element('add',meg="caigou_element").click()90 self.switch_to_context()91 # print (driver.page_source)92 self.get_by_local.get_element('add_supplier',meg="caigou_element").send_keys(u"æ²³æºä¾åºå")93 #select_supplier94 self.switch_to_context()95 self.get_by_local.get_element('select_supplier',meg="caigou_element").click()96 self.switch_to_context()97 self.get_by_local.get_element('add_goods',meg="caigou_element").click()98 self.switch_to_context()99 self.get_by_local.get_element('h1_warehouse',meg="caigou_element").click()100 self.switch_to_context()101 self.get_by_local.get_element('search_warehouse_baihuo',meg="caigou_element").click()102 self.switch_to_context()103 self.get_by_local.get_element('search_box',meg="caigou_element").send_keys(u"çè¾¾").send_keys(Keys.ENTER)104 self.switch_to_context()105 self.get_by_local.get_element('select_goods',meg="caigou_element").click()106 self.switch_to_context()107 self.get_by_local.get_element('goods_quantity',meg="caigou_element").clear().send_keys(10)108 self.get_by_local.get_element('confirm',meg="caigou_element").click()109 self.switch_to_context()110 self.get_by_local.get_element('confirm_select',meg="caigou_element").click()111 self.switch_to_context()112 self.get_by_local.get_element('Settlement',meg="caigou_element").click()113 self.switch_to_context()114 self.get_by_local.get_element('pay',meg="caigou_element").click()115 self.get_by_local.get_element('account',meg="caigou_element").click()116 self.switch_to_context()117 self.get_by_local.get_element('select_account',meg="caigou_element").click()118 self.switch_to_context()119 self.get_by_local.get_element('pay_for',meg="caigou_element").send_keys(50)120 self.switch_to_context()121 self.get_by_local.get_element('show_more',meg="caigou_element").click()122 time.sleep(3)123 # get_by_local.get_element('remake',meg="caigou_element").send_keys("test an order...")124 # ActionChains(driver).send_keys(u"test an order.").perform()125 # get_by_local.get_element('remake',meg="caigou_element").send_keys(u"test an order.")126 #driver.switch_to.active_element.send_keys(u"test an order.")127 self.get_by_local.get_element('Place_order',meg="caigou_element").click()128 print(self.driver.contexts)129 # driver.get_screenshot_as_file('./data/test_mn.png')130 time.sleep(2)131 self.switch_to_context()132 self.get_by_local.get_element('purinbound_list',meg="caigou_element").click()133 self.switch_to_context()134 self.get_by_local.get_element('select_date',meg="caigou_element").click()135 self.switch_to_context()136 self.get_by_local.get_element('date_today',meg="caigou_element").click()137 self.switch_to_context()138 self.get_by_local.get_element('purinbound_staus',meg="caigou_element").click()139 self.switch_to_context()140 self.get_by_local.get_element('unaudited',meg="caigou_element").click()141 self.switch_to_context()142 #æå°è®¢åç¼å·143 print(self.get_by_local.get_element('billno',meg="caigou_element").text)144 self.get_by_local.get_element('billno',meg="caigou_element").click()145 self.switch_to_context()146 #å®¡æ ¸åæ®...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!