简体   繁体   中英

AWS appium ios test always fail

I am implementing aws automation testing using appium junit .

i am trying to run my testing script on aws device farm , my test script is working fine on simulator but its failing on aws devices. error does not describes the problem correctly.

Whenever i run my script on aws devices it gives me following error. when i see the video, application was successfully launched and then nothing happens on the screen. i can see first popup that asks to allow push notifications and then after popover gets dismiss nothing happens.

  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

and here is my java appium test script

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);

i posted a question on aws forums no one awsering.

https://forums.aws.amazon.com/thread.jspa?threadID=247887

Don't set any DesiredCapabilities except for the URL. Resources to assist further are:

If you need specific assistance, please open a support case with AWS or post your issue on the AWS Device Farm forum and we can assist further.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM