"Execute Script" keyword is taking only one argument
XCode version: 13.4.1 Appium version: 1.22.3 robotframework-appiumlibrary version: 1.6.3 Appium-Python-Client: 1.3.0 iPhone and iOS: iPhone 8 and iOS 15.5
Execute Script keyword is not working for "mobile: commandName args: args1 arg2.." but works for with no argument keyword (For ex. "mobile: deviceInfo" works as expected)
When I execute mobile:terminateApp {'bundleId': 'com.firstalert.onelinkhome'} it returned
WebDriverException: Message: Unknown mobile command 'terminateApp {'bundleId': 'com.firstalert.onelinkhome'}'. Only tap, scroll, selectPickerWheelValue, swipe, pinch, doubleTap, twoFingerTap, tapWithNumberOfTaps, touchAndHold, dragFromToForDuration, rotateElement, alert, setPasteboard, getPasteboard, source, getContexts, installApp, isAppInstalled, removeApp, launchApp, terminateApp, queryAppState, activateApp, listApps, viewportScreenshot, viewportRect, startPerfRecord, stopPerfRecord, installCertificate, startLogsBroadcast, stopLogsBroadcast, batteryInfo, deviceInfo, getDeviceTime, activeAppInfo, deviceScreenInfo, pressButton, enrollBiometric, sendBiometricMatch, isBiometricEnrolled, clearKeychains, getPermission, setPermission, resetPermission, getAppearance, setAppearance, siriCommand, deleteFile, deleteFolder, startAudioRecording, stopAudioRecording, runXCTest, installXCTestBundle, listXCTestBundles, listXCTestsInTestBundle, pushNotification, expectNotification, performIoHidEvent, configureLocalization, resetLocationService commands are supported.
@nidit-mehta
This is an know issue #263 .
There exist workarounds which are also described in the other issue => calling the appium server via request directly
"Status Should be" and "POST" are part of robotframework-requestlibrary
`
Execute_Mobile_With_Args
[Arguments] ${command} ${arguments}
[Documentation] so mobile commands cannot be called with arguments
... in order to use this we have to call the appium server directly
${session_id}= Get Appium SessionId
${header}= Create Dictionary Content-Type=application/json;charset=UTF-8
POST ${APPIUM_SERVER}/session/${session_id}/execute headers=${header} data={"script":"mobile:${command}","args":[${arguments}]}
Status Should Be 200`
fixed with #363 please test