appium ios python "an error occured while executing user supplied javascript"

435 views Asked by At

I'm using a bit Appium (v1.3.7) to make nice tests! And I'm trying to have tests that runs on both Android and iOS. I'm testing directly on the phones not on simulators and using python to write tests.

I got a test to test if an ad banner is displayed and if I can click on it.

Simple enough on Android I open the application and navigate to the right place, then send a press event and assert that the elements of my application are no longer visible (since now we have the phone store openned at "download application" or something similar)

It's 2 lines:

e1 = TouchAction(self.webdriver)
e1.press(x=300, y=1200).release().perform()

It's working on Android, but on iOS it returns the exception : "an error occured while executing user supplied javascript" whenever I call the perform action.

All of this is done in a native application if it can help. The rest of appium is working fine I can move into my application and all but since here my ads can be pretty random I only had the "press where the ad should be" solution.

Also fruitsrap keep failing whenever I launch a test. Might be linked even if I found out that it should not be used anymore (https://github.com/appium/appium/issues/4501)

Do anyone knows what's happening in there?

1

There are 1 answers

0
SeikoTheWiz On BEST ANSWER

Figured what was wrong, the x and y positions were out of bound, the screen resolution of the phone was smaller than I thought.

It's working properly with in bound values. But the error message should be more explicit :)