wanglongpa
wanglongpa
采纳率0%
2016-06-20 02:54 阅读 12.8k

初学appium,报服务端的错误

下面这段代码,APP能启动,能打印111,每次在执行
self.driver.find_element_by_android_uiautomator('new UiSelector().className("android.widget.TextView").text("我")').click() 的时候就报错:An unknown server-side error occurred while processing the command,跪求各位大神帮忙解答

class LoginApp(unittest.TestCase):
def setUp(self):
desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '4.2.2'
desired_caps['deviceName'] = 'Droid4X-WIN'
desired_caps['appPackage'] = 'com.junte.onlinefinance'
desired_caps['appActivity'] = '.ui.activity.SpalshActivity'
self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub',desired_caps)
self.driver.implicitly_wait(5)

def login_test(self):

    print "1111"
    self.driver.find_element_by_android_uiautomator('new UiSelector().className("android.widget.TextView").text("我")').click()
    print "222"
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • wanglongpa wanglongpa 2016-06-20 05:39

    重装了APPium就好了

    点赞 评论 复制链接分享

相关推荐