我用的是 ruby+appium 做的测试 报错信息如下图
但在连网情况下,确不会报错
我的 appium 配置如下
希望大神指导
require 'appium_lib'
#coding:utf-8
caps = { caps: { platformName: 'Android', appActivity: 'com.tencent.mm.ui.LauncherUI', appPackage: 'com.tencent.mm',deviceName: 'Android Emulator',unicodeKeyboard: "True"},
appium_lib: { sauce_username: nil, sauce_access_key: nil } }
driver = Appium::Driver.new(caps).start_driver
sleep 10
driver.find_element(:xpath,'//android.support.v7.widget.LinearLayoutCompat/android.widget.TextView').click
driver.find_element(:xpath,'//android.widget.EditText[@resource-id="com.tencent.mm:id/gz"]').send_keys("浙江移动");
sleep 2
driver.find_element(:xpath,'//android.widget.ListView/android.widget.RelativeLayout[@index=1]').click;
sleep 1
driver.find_element(:xpath,'//android.widget.ImageView[@resource-id="com.tencent.mm:id/a4k"]').click;
sleep 1
driver.find_element(:xpath,'//android.widget.EditText').send_keys("查话费");
puts driver.find_element(:xpath,'//android.widget.EditText').attribute("text")
driver.find_element(:xpath,'//android.widget.Button[@text="发送"]').click;