Unable to automate Safari on iPhone

When is the Appium studio 20.3 coming out? IS it coming out any time soon?

As far as I know its not been uploaded as yet. We will update this thread once uploaded.

Appium Studio 20.3 can be download via https://experitest.com/mobile-test-automation/appium-studio (It will be mailed after registration)

1 Like

Hi,

I’ve tried on fryday to download the latest version, but I didn’t received the email with download link. Any idea about this ?

Please check your Email Junk folder or contact your Email Server Admin they would have rejected our email.

I had to download it with the email of one of my collegue, I guess there is a problem on your side with already used email maybe ?
Anyway, I’m downloading the last version right now and keep you inform if problem persist.

Bad news, I have a lot of error of the type : “Failed to complete internal method”, wether doing a simple sendKeys in a field or an ExecuteScript. But it does not happened on every fields.

Please paste the section of the log which give you this error.

The logs are in %appiumstudio%\appiumstudio in Appium Studio-YY-dd-mm-min-seconds.log

Just installed 20.4.6801 and the issue is fixed now. Thank you Experitest team!

Here is the log of the error that I have on a scroll method :

java.lang.RuntimeException: element was found but is not visible
at com.experitest.device.HybridWebElement.getElementPositionProps(HybridWebElement.java:656)
at com.experitest.device.HybridWebElement.initLocation(HybridWebElement.java:560)
at com.experitest.device.HybridWebElement.getLocation(HybridWebElement.java:457)
at com.experitest.device.WebSearchAdaptor.operate(WebSearchAdaptor.java:296)
at com.experitest.image.agent.Controller.getIdleObjPositionByXpath(Controller.java:3226)
at com.experitest.image.agent.Controller.access$3100(Controller.java:257)
at com.experitest.image.agent.Controller$WaitForElementLogic.handleWebIdentType(Controller.java:12056)
at com.experitest.image.agent.Controller$WaitForElementLogic.tryFindPosition(Controller.java:11993)
at com.experitest.image.agent.Controller$WaitForElementLogic.invoke(Controller.java:11930)
at com.experitest.image.agent.Controller.waitForElementIntWithSt(Controller.java:2875)
at com.experitest.image.agent.Controller.waitForElementInt(Controller.java:2864)
at com.experitest.image.agent.Controller.findElements(Controller.java:3028)
at sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.experitest.image.agent.controller.ControllerMediator.handleCommandExecution(ControllerMediator.java:90)
at com.experitest.image.agent.controller.ControllerMediator.invoke(ControllerMediator.java:69)
at com.sun.proxy.$Proxy16.findElements(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.experitest.image.agent.appium.backend.commands.SeeTestControllerProxy.invokeMethod(SeeTestControllerProxy.java:55)
at com.experitest.image.agent.appium.backend.commands.AppiumCommandsSeeTestControllerProxy.invoke(AppiumCommandsSeeTestControllerProxy.java:50)
at com.sun.proxy.$Proxy16.findElements(Unknown Source)
at com.experitest.image.agent.appium.backend.commands.find.GeneralFindElementCommand.findElements(GeneralFindElementCommand.java:124)
at com.experitest.image.agent.appium.backend.commands.find.GeneralFindElementCommand.findElements(GeneralFindElementCommand.java:61)
at com.experitest.image.agent.appium.backend.commands.find.GeneralFindElementCommand.findElements(GeneralFindElementCommand.java:45)
at com.experitest.image.agent.appium.backend.commands.find.FindChildElementsCommand.doExecute(FindChildElementsCommand.java:9)
at com.experitest.image.agent.appium.backend.commands.AppiumCommand.execute(AppiumCommand.java:170)
at com.experitest.image.agent.appium.http.AppiumGenericCommandHandler.lambda$executeCommand$1(AppiumGenericCommandHandler.java:314)
at com.experitest.utils.background.BackgroundTasks$DelegatingRenamingCallable.call(BackgroundTasks.java:221)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

And here is what I have on a sendText method :

2020-04-30 16:46:39,301 [Restlet-21002987-sendKeys-sid:f9902124-611b-4e90-a6de-717211deb862] (backend.commands.AppiumCommand) ERROR Exception of type ‘com.experitest.image.agent.appium.backend.errors.STAppiumException’ : An unknown server-side error occurred. status=‘false’. Failed to complete internal method: ‘elementSendText args: [WEB, xpath=(//[@id=‘autocompleteInput’])[1], 0, Sao Paulo]’, details:
com.experitest.image.agent.appium.backend.errors.STAppiumException: An unknown server-side error occurred. status=‘false’. Failed to complete internal method: 'elementSendText args: [WEB, xpath=(//
[@id=‘autocompleteInput’])[1], 0, Sao Paulo]’, details:
at com.experitest.image.agent.appium.backend.errors.STAppiumException.newUnknownErrorException(STAppiumException.java:89)
at com.experitest.image.agent.appium.backend.commands.AppiumCommandsSeeTestControllerProxy.validateInvokeResult(AppiumCommandsSeeTestControllerProxy.java:102)
at com.experitest.image.agent.appium.backend.commands.AppiumCommandsSeeTestControllerProxy.invoke(AppiumCommandsSeeTestControllerProxy.java:51)
at com.sun.proxy.$Proxy16.elementSendText(Unknown Source)
at com.experitest.image.agent.appium.backend.commands.element.ElementSendKeysCommand.doExecute(ElementSendKeysCommand.java:39)
at com.experitest.image.agent.appium.backend.commands.AppiumCommand.execute(AppiumCommand.java:170)
at com.experitest.image.agent.appium.http.AppiumGenericCommandHandler.lambda$executeCommand$1(AppiumGenericCommandHandler.java:314)
at com.experitest.utils.background.BackgroundTasks$DelegatingRenamingCallable.call(BackgroundTasks.java:221)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Could be because Hybrid Application.

Suggest you to install the app in instrumented mode , use the xpath for the element too for this instrumented mode and run u r code too instrumented mode (while running the app make sure instrumentApp capability)

I’m using Safari. Is it possible to launch it instrumented ?
I’m using those capabilities :

            capabilities.setCapability("platformName", platform);
            capabilities.setCapability("platformVersion", platformVersion); //Replace this with your Android version
            capabilities.setCapability("deviceName", deviceName); //Replace this with your simulator/device
            capabilities.setBrowserName(MobileBrowserType.SAFARI);

Any tips for this new problem ?

Ok. It appeared as if you used an Hybrid app but this is a pure web application.

  • Do an inspect via Object spy on whole flow and check if the element is supposed to visible or not.
  • Also check while doing this if some other element is above this element.

Is iOS 13.4.1 is compatible with latest appium studio version - 20.4.6801 ?

Only 13.4 is supported till now.

I still have problem with AppiumStudio and Safari. For exemple, on a makeVisible method (which do a scroll with javascript) :

org.openqa.selenium.WebDriverException: unknown error (An unknown server-side error occurred. status=‘false’. Failed to complete internal method: ‘hybridRunJavascript args: [, 0, result = null;resultType = null;resultMessage = null;function getPathToWithSuffix(element,suffix) {if (element.tagName.toUpperCase() == “HTML”.toUpperCase())return ‘//html’+suffix;if (element===document.body)return ‘//html/body[1]’+suffix;var ix= 0;var siblings= element.parentNode.childNodes;for (var i= 0; i<siblings.length; i++) {var sibling= siblings[i];if (sibling===element)return getPathToWithSuffix(element.parentNode,’/’+element.tagName.toLowerCase()+’[’+(ix+1)+’]’+suffix);if (sibling.nodeType===1 && sibling.tagName===element.tagName)ix++;}}function runScriptResultWrapper(element){if((typeof element === undefined) || element == null){result = null;resultMessage = null;return;}else if (typeof element === ‘string’ || element instanceof String){result = element;resultType = “string”;resultMessage = null;return;}else if (typeof element === ‘number’ || element instanceof Number){if(element % 1 === 0){resultType = “int”}else{resultType = “float”;}result = element;resultMessage = null;return;}else if (typeof element === ‘boolean’ || element instanceof Boolean){resultType = “boolean”;result = element;resultMessage = null;return;}var paths = [];if(element.constructor === Array || element.length > 0){var elements = element;for (i = 0; i < elements.length; i++) {var elementPath = getPathToWithSuffix(elements[i],"");paths[i] = elementPath;}resultMessage = null;}else if(!element.parentNode){resultType = “object”;result = element;resultMessage = null;return;}else{resultMessage = null;paths[0] = getPathToWithSuffix(element,"");}resultType = null;result = {value: paths};};var userFunc = function() {var arguments = new Array();arguments[0]=document.evaluate("(//[@class=“navUser”]//[translate(translate(local-name(), ‘abcdefghijklmnopqrstuvwxyz’, ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’),‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’,‘abcdefghijklmnopqrstuvwxyz’)=translate(‘a’,‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’,‘abcdefghijklmnopqrstuvwxyz’)])[1] | (//[@class=“navUser”]//[translate(local-name(),‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’,‘abcdefghijklmnopqrstuvwxyz’)=translate(‘a’,‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’,‘abcdefghijklmnopqrstuvwxyz’)])[1]", document, null, XPathResult.ANY_TYPE, null).iterateNext();;arguments[0].scrollIntoView(true);;};result = null;var temp_result = userFunc();if(result == null) {result = temp_result;} runScriptResultWrapper(result);]’, details: Failed to run javascript ‘’. missing ) after argument list (line#1). missing ) after argument list (line#1)) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: ‘3.14.0’, revision: ‘aacccce0’, time: ‘2018-08-02T20:19:58.91Z’
System info: host: ‘2DFD2G2’, ip: ‘192.168.56.1’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_221’
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities {appBuildVersion: , appReleaseVersion: , appiumVersion: 1.8.0, autoAcceptAlerts: false, autoDismissAlerts: false, autoGrantPermissions: false, autoWebview: false, automationName: XCUITest, browserName: Safari, commandTimeouts: 120000, desired: {browserName: Safari, deviceName: iPhone 6S-5, platformName: iOS, platformVersion: 13.4}, device.category: PHONE, device.majorVersion: 13, device.manufacture: Apple, device.model: iPhone 6s, device.name: iPhone 6S-5, device.os: iOS, device.screenSize: 750x1334, device.serialNumber: 08f9794bc58584eb36994e7321c…, device.version: 13.4, deviceName: iPhone 6S-5, deviceUDID: 08f9794bc58584eb36994e7321c…, dontGoHomeOnQuit: false, dontStopAppOnReset: false, fullReset: false, install.only.for.update: false, instrumentApp: false, javascriptEnabled: true, keystorePath: ~/.android/debug.keystore, locationServicesAuthorized: false, newSessionWaitTimeout: 600, noReset: false, platform: IOS, platformName: iOS, platformVersion: 13.4, projectName: , reportDirectory: reports, reportFormat: xml, reportUrl: C:\Users\grageul\appiumstud…, reservationDuration: 240, takeScreenshots: true, test.type: Mobile, testName: mobile test 06/03/20 10:29 AM, udid: 08f9794bc58584eb36994e7321c…, useKeystore: false, waitForDeviceTimeout: 120000}
Session ID: abb2086f-eb74-41b3-97ec-a87d992e1e03