i’m using the new installCertificates method supported in appium-xcuitest-driver.
This is simple code that’s running
var options = new AppiumOptions();
options.AddAdditionalCapability("platformVersion", "14.6");
options.AddAdditionalCapability("platformName", "iOS");
options.AddAdditionalCapability("automationName", "XCUITest");
options.AddAdditionalCapability("updatedWDABundleId", "***********");
options.AddAdditionalCapability("deviceName", "iPhone 6s");
options.AddAdditionalCapability("udid", "auto");
options.AddAdditionalCapability("autoAcceptAlerts", true);
options.AddAdditionalCapability("bundleId", "com.apple.calculator");
var driver = new IOSDriver<IOSElement>(options, TimeSpan.FromSeconds(300));
string filePath = "/Users/supportuser/Downloads/certificate.pem";
var certContents = File.ReadAllBytes(filePath);
string certificateData = Convert.ToBase64String(certContents);
Console.Write(certificateData);
driver.ExecuteScript("mobile:installCertificate", new Dictionary<string, string> { { "content", certificateData } });
i get a weird response that i’m not expecting which is
OpenQA.Selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot find {“type”:“accessibility id”,“value”:“Allow”} within 15000ms timeoutResult message:
Which i’m not sure what this means, as nothing else happens on the screen and the certficate isn’t installed