How to use test_touch_factor method in Airtest

Best Python code snippet using Airtest

test_ios.py

Source:test_ios.py Github

copy

Full Screen

...196 print("test_home_interface")197 self.ios.home()198 time.sleep(2)199 self.assertTrue(self.ios.home_interface())200 def test_touch_factor(self):201 """202 在部分特殊型号的设备上,可能默认的touch_factor不能正确点击对应的位置,因此需要修正203 Returns:204 """205 print("test touch factor")206 print("ios.driver.scale:", self.ios.driver.scale)207 print("display_info:", self.ios.display_info)208 print("default touch_factor:", self.ios.touch_factor)209 self.ios.touch((500, 500))210 self.ios.touch_factor = 1/3.3211 self.ios.touch((500, 500))212if __name__ == '__main__':213 # unittest.main()214 #构造测试集...

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