Unable to dismiss system messages

Hey there!

I am running into an issue running appium python on the AWS device farm and I am really looking for assistance.
What happens is on some devices (mostly samsung phones running 5.1.1) system messages pop up like the device is running for the first time. I need to write code to click them away but everything I’ve tried so far does not work.
Here is what I have tried:

a few variations of self.driver.find_element_by_id. None of which have worked so far. I assume I just dont have the right name but I have no way to load the AWS Device Farm instances locally to check
I have tried to find by the following ids:

self.driver.switch_to_alert().accept() gets a not implemented message using appium python

find_element_by_android_uiautomator(‘new UiSelector.textContains(“OK”)’).click() gets me the following message
“Message: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource.”

find_element_by_name (I hear this is deprecated and probably removed) gets me “Message: Locator Strategy ‘name’ is not supported for this session”

autoAcceptAlerts and autoDismissAlerts in desired capabilities do not dismiss the messages

HELP!!! I’ve tried just about everything I can think of.

Here are some screenshots of the messages:

Screenshot from appium please

I am unable to link Appium desktop to AWS unfortunately. Is there anything specific you wanted to see?

The screenshots are from my appium run on the AWS device farm. The scripts run on their own without any input once uploaded so I am not quite sure what I would be able to take a screenshot of beyond what I did provide.

on your local machine it’s working fine?

I’m unable to reproduce locally. I do not have a physical device or an emulator that pops up the same system messages (Or system messages in general)

Just a suggestion;Can you try identifying the popup and click OK based on coordinates?

I can do that but it would be my last ditch effort.
All of the devices I am testing against (42 chosen from the AWS device farm list) have different screen resolutions and Amazon does not list them so I would have to look them up, estimate where the OK button and use trial and error until I got the correct spot. I’d have to do that for at least the 13 devices failing in this way and build some sort of map to walk through each of them.

Yeah! I know it is such a bad idea :slight_smile: . Please do add the solution if you finds it.