How to use pm_uninstall method in Airtest

Best Python code snippet using Airtest Github


Full Screen

...119 break120 self.assertGreater(line_cnt, 0)121 def test_pm_install(self):122 if PKG in self.adb.list_app():123 self.adb.pm_uninstall(PKG)124 self.adb.pm_install(APK)125 self.assertIn(PKG, self.adb.list_app())126 self.adb.pm_uninstall(PKG)127 self.assertNotIn(PKG, self.adb.list_app())128 def test_ip(self):129 ip = self.adb.get_ip_address()130 if ip:131 self.assertEqual(len(ip.split('.')), 4)132 def test_gateway(self):133 gateway = self.adb.get_gateway_address()134 if gateway:135 self.assertEqual(len(gateway.split('.')), 4)136if __name__ == '__main__':...

Full Screen

Full Screen Github


Full Screen

...56 parser_pm_list.set_defaults(func=pm_list)57 parser_pm_list.add_argument("-j","--json",action='store_true',help="以json格式输出")5859 #卸载60 def pm_uninstall(args):61 from vogen import pm62 pm.uninstall( parser_pm_uninstall=subparsers_pm.add_parser("uninstall",help="卸载")64 parser_pm_uninstall.add_argument("id")65 parser_pm_uninstall.set_defaults(func=pm_uninstall)66 67 #设置68 def config(args):#输出当前设置69 from vogen import config70 from tabulate import tabulate71 if(args.json):72 print(json.dumps(config.config))73 else:74 print(tabulate(config.config.items(),headers=["Key","Value"])) ...

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?