from appium import webdriver 
import pytest 

class Test_ABC(object):

	def setup_class(self):
		desired_caps = {}
		desired_caps['platformName'] = 'Android'
		desired_caps['platformVersion'] = '7.1'
		desired_caps['devicesName'] = '192.168.50.101:5555'
		desired_caps['appPackage'] = 'com.android.settings'
		desired_caps['appActivity'] = '.Settings'

		#声明driver对象
		self.driver = webdriver.Remote('http:127.0.0.1:21503/wd/hub', desired_caps)
	
	def teardown_class(self):
		self.driver.close_app()
		self.driver.quit()

	def test_a(self):
		self.driver.find_element_by_xpath("//*[contains(@text, 'WLA')]").click()
		#业务逻辑

相关文章:

  • 2021-08-13
  • 2021-09-26
  • 2021-10-24
  • 2021-10-07
  • 2021-11-29
  • 2021-10-30
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-26
  • 2021-07-08
  • 2021-04-07
  • 2021-04-27
  • 2021-05-28
相关资源
相似解决方案