import time
import unittest
from appium.webdriver.common.touch_action import TouchAction
from selenium.webdriver.common.action_chains import ActionChains
class SimpleIOSTests(unittest.TestCase):
def setUp(self):
# set up appium
app = "com.kugou.fm"
self.driver = webdriver.Remote(
command_executor='http://127.0.0.1:4723/wd/hub',
desired_capabilities={
'app': app,
'platformName': 'iOS',
'platformVersion': '8.3',
'udid': '99da17f05fb2fd56017dd0c9fc25e46fce84d102',
'deviceName': 'iPhone5'
})

def test_ui_computation(self):
el = self.driver.find_element_by_accessibility_id("我的页面")
el.click()

def tearDown(self):
self.driver.quit()

if name == 'main':
#suite = unittest.TestLoader().loadTestsFromTestCase(SimpleIOSTests)
suite=unittest.TestSuite()
suite.addTest(SimpleIOSTests("test_ui_computation"))
unittest.TextTestRunner(verbosity=2).run(suite)

报错的错误截图
![](/photo/2016/de128460259bd15204ea49885983e781.jpg)


↙↙↙阅读原文可查看相关链接,并与作者交流