How to use func_desc_poco method in Airtest

Best Python code snippet using Airtest Github


Full Screen

...40 vector = step[1]["kwargs"].get("vector")41 if vector:42 ret['swipe'] = self.dis_vector(vector)43 ret['vector'] = vector44 ret['desc'] = self.func_desc_poco(ret)45 ret['title'] = self._translate_title(ret)46 return ret47 def func_desc_poco(self, step):48 """ 把对应的poco操作显示成中文"""49 desc = {50 "touch": u"点击UI组件 {name}".format(name=step.get("text", "")),51 }52 if step['type'] in desc:53 return desc.get(step['type'])54 else:55 return self._translate_desc(step)56if __name__ == "__main__":57 report.LogToHtml = PocoReport58 import argparse59 ap = argparse.ArgumentParser()60 args = report.get_parger(ap).parse_args()61 report.main(args)

Full Screen

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:


You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Airtest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?