我正在使用appium junit实现 aws 自动化测试。
我正在尝试在aws 设备场上运行我的测试脚本,我的测试脚本在模拟器上运行良好,但在 aws 设备上失败。错误没有正确描述问题。
每当我在 aws 设备上运行我的脚本时,它都会给我以下错误。当我看到视频时,应用程序已成功启动,然后屏幕上没有任何反应。我可以看到第一个弹出窗口要求允许推送通知,然后在弹出窗口被关闭后没有任何反应。
failed: An error occurred while executing user supplied JavaScript.
(WARNING: The server did not provide any stacktrace information) Command
duration or timeout: 1.48 seconds Build info: version: '2.53.0', revision:
'35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'ip-172-31-13-65', ip: '172.31.13.65', os.name: 'Linux',
os.arch: 'amd64', os.version: '3.13.0-53-generic', java.version:
'1.8.0_65' Driver info: io.appium.java_client.ios.IOSDriver Capabilities
[{networkConnectionEnabled=false, desired={}, warnings={},
webStorageEnabled=false, locationContextEnabled=false, browserName=iOS,
takesScreenshot=true, javascriptEnabled=true, databaseEnabled=false,
platform=MAC}] Session ID: ca42e475-f253-40ed-a143-fef52146f655
这是我的 java appium 测试脚本
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, MobilePlatform.IOS);
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "9.1");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 5s");
capabilities.setCapability(CapabilityType.BROWSER_NAME, MobilePlatform.IOS);
capabilities.setCapability("autoAcceptAlerts", true);
capabilities.setCapability("showIOSLog", true);
capabilities.setCapability(CapabilityType.SUPPORTS_NETWORK_CONNECTION, true);
String path = "/Users/home/Desktop/";
File app;
app = new File(path,"projectapp.ipa");
capabilities.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());
capabilities.setCapability(MobileCapabilityType.FULL_RESET, false);
capabilities.setCapability(MobileCapabilityType.NO_RESET, true);
URL url =new URL("http://127.0.0.1:4723/wd/hub");
driver = new IOSDriver<WebElement>(url, capabilities);
我在没有人关注的aws论坛上发布了一个问题。