Best Python code snippet using Airtest
sift.py
Source:sift.py
...16 # å¹é
ç¹å¯¹ä¸º1ï¼å¯ä¿¡åº¦èµäºè®¾å®å¼ï¼å¹¶ç´æ¥è¿å:17 return _handle_one_good_points(kp_src, good, threshold) if ONE_POINT_CONFI >= threshold else None18 elif len(good) == 2:19 # å¹é
ç¹å¯¹ä¸º2ï¼æ ¹æ®ç¹å¯¹æ±åºç®æ åºåï¼æ®æ¤ç®åºå¯ä¿¡åº¦ï¼20 origin_result = _handle_two_good_points(im_source, im_search, kp_src, kp_sch, good)21 if isinstance(origin_result, dict):22 return origin_result if ONE_POINT_CONFI >= threshold else None23 else:24 middle_point, pypts, w_h_range = _handle_two_good_points(im_source, im_search, kp_src, kp_sch, good)25 elif len(good) == 3:26 # å¹é
ç¹å¯¹ä¸º3ï¼ååºç¹å¯¹ï¼æ±åºç®æ åºåï¼æ®æ¤ç®åºå¯ä¿¡åº¦ï¼27 origin_result = _handle_three_good_points(im_source, im_search, kp_src, kp_sch, good)28 if isinstance(origin_result, dict):29 return origin_result if ONE_POINT_CONFI >= threshold else None30 else:31 middle_point, pypts, w_h_range = _handle_three_good_points(im_source, im_search, kp_src, kp_sch, good)32 else:33 # å¹é
ç¹å¯¹ >= 4个ï¼ä½¿ç¨åç©éµæ å°æ±åºç®æ åºåï¼æ®æ¤ç®åºå¯ä¿¡åº¦ï¼34 middle_point, pypts, w_h_range = _many_good_pts(im_source, im_search, kp_sch, kp_src, good)35 # 第åæ¥ï¼æ ¹æ®è¯å«åºåï¼æ±åºç»æå¯ä¿¡åº¦ï¼å¹¶å°ç»æè¿è¡è¿å:36 # 对è¯å«ç»æè¿è¡åçæ§æ ¡éª: å°äº5个åç´ çï¼æè
缩æ¾è¶
è¿5åçï¼ä¸å¾è§ä¸ºä¸åæ³ç´æ¥raise.37 _target_error_check(w_h_range)38 # å°æªå¾åè¯å«ç»æ缩æ¾å°å¤§å°ä¸è´,åå¤è®¡ç®å¯ä¿¡åº¦...
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!!