iosamazon-web-servicesappiumaws-device-farm

How to set up alert autoaccept to true/false using AWS device farm for iOS?


I defined capabilities.setCapability("autoAcceptAlerts", false); This is working on simulator. However this doesn't work for Device Farm(AWS)'s device.

How can I configure alert autoaccept for ios devices in Device Farm?

If the capabilities are given by Device Farm, how can we override them? Where and how to override the alert autoaccept capability?


Solution

  • Answer is - Override the driver capability to false. Default value is true in AWS devicefarm. Overriding will update it to false. Make sure to look into the appium logs to confirm the actual autoAcceptAlert value being passed. Below is the code which I added to override during the driver instantiation:

    capabilities.setCapability("autoAcceptAlerts", false);

    #mobileautomation