How to make a python test stable for safari on real device using appium

Hi everybody,

I’m testing a mobile safari using appium and am using python to run the script. The problem is sometimes the test works and sometimes doesn’t. Does anybody has a similiar problem or solution?

here is my sample-code:

here is the log-file, if the test is failing:

regards