How to use translate_poco_step method in Airtest

Best Python code snippet using Airtest

poco.py

Source:poco.py Github

copy

Full Screen

1from airtest.report import report2class PocoReport(report.LogToHtml):3 def translate(self, step):4 if step["is_poco"] is True:5 return self.translate_poco_step(step)6 else:7 return super(PocoReport, self).translate(step)8 def translate_poco_step(self, step):9 """10 处理poco的相关操作,参数与airtest的不同,由一个截图和一个操作构成,需要合成一个步骤11 Parameters12 ----------13 step 一个完整的操作,如click14 prev_step 前一个步骤,应该是截图15 Returns16 -------17 """18 ret = {}19 prev_step = self._steps[-1]20 if prev_step:21 ret.update(prev_step)22 ret['type'] = step[1].get("name", "")...

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:

YouTube

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?

Helpful

NotHelpful