Custom Execution doesn't work for Android Devices


#1

I cannot get Custom Execution working for Android devices on either Mac OS or Windows 10 using either Katalon 5.3.1 or 5.4.1. I receive the error: Test Cases/… FAILED because (of) Unable to start app at: ‘Data Files/…apk’ (Root cause: java.lang.IllegalArgumentException: The mobile device is missing. Please select the mobile device to be executed and try again.)

I have tried defining the mobile device within the Desired Capabilities, but nothing seems to help. It also looks like the device is never saved to the custom execution property setting, the dropdown always starts empty. We need to run Mobile and WebUI tests together in the same test case, but my workaround is running into driver count issues when I have both the Appium and Selenium drivers open at the same time, so I am trying to get this to work.

I have tried several variations, but always receive the same error, variations such as:
{“ANDROID_DRIVER”:{“noReset”:false,“platformName”:“Android”,“platformVersion”:“7.0”,“deviceId”:“146bXXXX”,“deviceName”:“samsung SM-G930V (Android 7.0)”}}
{“ANDROID_DRIVER”:{“noReset”:false}}
{“ANDROID_DRIVER”:{“appPackage”:“XXXX”,“appWaitActivity”:“com.*”}}

Capture.PNG


#2

Still getting this same issue with Katalon 5.4.2. I have tried several workarounds, but if I select the Android execution and open the web browser in code (RunConfiguration.storeDriver()), I get an index out of range exception (1) as soon as I try to perform any regular WebUI action on the browser. As if Katalon is checking for running drivers and trying to execute against the last in the array, but it doesn’t handle Appium and Selenium drivers differently, so it tries to increment the array for Selenium, but it is out of the range.


#3

Hi,

I also have a similar case as stated above. Please let me know if you find a solution to it.


#4

Hi all

You need to select the device from ‘Device Name’ dropdown box, otherwise you will see that error. This is not an issue because Android settings are not designed to pass in deviceId like that.


#5

Hi Vinh,
Please try this yourself. I select the device in Driver Builder, but after I click OK, the device is not saved and I get the error.

Ideally, even if this is blank, it should provide the ordinary Android/iOS device popup prompt to specify an attached device to run on.

After saving, when I reopen the DeviceBuilder, the device is blank again.

DeviceSelected.PNG

AfterSaving.PNG


#6

Hi guys,
This issue has been fixed with the latest version, check it again make sure it has been solved :))


#7

Alice said:

Hi guys,
This issue has been fixed with the latest version, check it again make sure it has been solved :))

Hi Alice,

I actually just tried this on both MacOS and Windows 10 using Katalon 5.9.0. I now see the deviceId field is correctly filled and saved. HOWEVER, it still doesn’t work. I still get an error when trying to run my test:

11-28-2018 04:05:55 PM Test Cases/Mobile Test

Elapsed time: 1.949s

Test Cases/Mobile Test FAILED.

Reason:

com.kms.katalon.core.exception.StepFailedException: Unable to start app at: ‘Data Files/Test.apk’ (Root cause: java.lang.IllegalArgumentException: The mobile device is missing. Please select the mobile device to be executed and try again.)

at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)

at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.stepFailed(MobileKeywordMain.groovy:40)

at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:23)

at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.startApplication(StartApplicationKeyword.groovy:51)

at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.execute(StartApplicationKeyword.groovy:40)

at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)

at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.startApplication(MobileBuiltInKeywords.groovy:74)

at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$startApplication.call(Unknown Source)

at Start App.run(Start App:24)

at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)

at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)

at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:321)

at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:312)

at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:291)

at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:283)

at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:222)

at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)

at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:59)

at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.call(CallTestCaseKeyword.groovy)

at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:54)

at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.callTestCase(CallTestCaseKeyword.groovy:80)

at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.execute(CallTestCaseKeyword.groovy:44)

at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)

at com.kms.katalon.core.keyword.BuiltinKeywords.callTestCase(BuiltinKeywords.groovy:334)

at Mobile Test.run(Mobile Test:44)

at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)

at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)

at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:321)

at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:312)

at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:291)

at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:283)

at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:222)

at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)

at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:97)

at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)

at TempTestCase1543439152708.run(TempTestCase1543439152708.groovy:22)