Selenium IOS and system updates

I’m a bit new to IOS, and to Appium as well, so looking for a strategy pointer or two.
Overnight, I am having all of my tests failing (sob story I know) the target tablet has a popup message saying something like

An IOS update is available, would you like to?
/Update now
/Update later

When I clear the dialog away, Appium is happy to control the target device again - I inherently don’t want to allow system updates, but I’m a apple newbie and unsure of a good policy on this problem, since I will start to loose control of the environment is a major version gets deployed by Apple in an update.

What tips are there I can take for free?
#Homework

Hi,
Apple will insist on your devices to be updated, what I ended up doing is check before the tests start to see if there’s an update pop up and dismiss it. You can write a script like the ones you use for testing with appium to do this.

Cheers,

1 Like

I don’t really want to check before each test case, but since I’m using a Nose based framework, (Python) so I cannot really control the order in which tests get run. I have to check in every test during the setup. But that does sound like the best workaround - I am thinking to do it as a “test failure” assertion to clear the dialog, but fail that particular test case. And fail with the failure cause “updates required” being raised to make triage later on easier. This will at least allow 99% of the tests to still pass normally I hope.

Trouble is, the dialog appeared to be modal/secure, so not sure that appium could actually “see” or control the dialog, will have to try and then report back.

Turns out that WebDriver cannot background/reinstall when this happens on the iOS device, so it’s actually impossible to recover for me.

It’s impractical to dismiss pop-ups if I’m quarantined / working from home.

I did find a really good hidden blog that does talk about this https://useyourloaf.com/blog/handling-system-alerts-in-ui-tests/ . It does not directly help, but even though it feels like the best bet is to start using the simulator and just letting it reboot, but would require some redesign on my part.
I also foudn a capability thats entirely undocumented autoAcceptAlerts - although I suspect it only works on the Android automation driver.