This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/new/version-630.html
This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/new/version-630.html
how to use start existing application
i have use it, the script like this
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
Mobile.startExistingApplication(âcn.com.pconline.shoppingâ)
Mobile.tap(findTestObject('n/android.widget.TextView23 - '), 0)
Mobile.tap(findTestObject(ân/android.widget.TextView7 - Hisense H55E3A 554Kâ), 0)
Mobile.tap(findTestObject(ân/android.widget.ImageView0â), 0)
Mobile.closeApplication()
but have wrong in running,like this
Unable to start app with application ID: âcn.com.pconline.shoppingâ (Root cause: groovy.lang.MissingMethodException: No signature of method: com.kms.katalon.core.appium.driver.SwipeableAndroidDriver.activateApp() is applicable for argument types: (java.lang.String) values: [cn.com.pconline.shopping]
at com.kms.katalon.core.mobile.keyword.builtin.StartExistingApplicationKeyword$_startApplication_closure1.doCall(StartExistingApplicationKeyword.groovy:41)
at com.kms.katalon.core.mobile.keyword.builtin.StartExistingApplicationKeyword$_startApplication_closure1.doCall(StartExistingApplicationKeyword.groovy)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:21)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain$runKeyword.call(Unknown Source)
at com.kms.katalon.core.mobile.keyword.builtin.StartExistingApplicationKeyword.startApplication(StartExistingApplicationKeyword.groovy:43)
at com.kms.katalon.core.mobile.keyword.builtin.StartExistingApplicationKeyword.execute(StartExistingApplicationKeyword.groovy:34)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.startExistingApplication(MobileBuiltInKeywords.groovy:88)
at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$startExistingApplication.call(Unknown Source)
at New Test Case (1).run(New Test Case (1):16)
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:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1562040377598.run(TempTestCase1562040377598.groovy:21)
)
the script is create by record
We will check this case. Thanks for your report.
Hi @395201116,
Our QAs verified that Mobile.startExistingApplication is working normally. Please provide more information:
- Appium version
- Your OS version
- The Katalon Studio zip file location/ URL you downloaded.
Thanks.
appium version: 1.12.1
OS : window 7 service pack 1
I donât know if itâs because Iâm upgrading by overwriting old versions of directory files
Maybe, you should copy the fresh install to another folder first.
Thanks.
I tried it, and now itâs OK
Now I can confirm that the issue was caused by the coverage upgrade
thanks!
Hello,
I see couple of errors after execution on Release 6.3.0. These are just errors and not failures. All these cases are working fine on Release 6.2.0. Few logs below for referenceâŚ
==================================================================================
groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed:
GStringTemplateScript388.groovy: 2: illegal string body character after dollar sign;
solution: either escape a literal dollar sign â$5â or bracket the value expression â${5}â @ line 2, column 125.
ge/144531?$xsmall$â and @cla
^
1 error
at com.kms.katalon.core.util.StrSubstitutor.replace(StrSubstitutor.java:37)
at com.kms.katalon.core.testobject.ObjectRepository.lambda$0(ObjectRepository.java:255)
at com.kms.katalon.core.testobject.ObjectRepository.findWebUIObject(ObjectRepository.java:252)
at com.kms.katalon.core.testobject.ObjectRepository.readTestObjectFile(ObjectRepository.java:206)
at com.kms.katalon.core.testobject.ObjectRepository.findTestObject(ObjectRepository.java:174)
at com.kms.katalon.core.testobject.ObjectRepository.findTestObject(ObjectRepository.java:127)
at com.kms.katalon.core.testobject.ObjectRepository$findTestObject.callStatic(Unknown Source)
at Add All to Wishlist - Guest.run(Add All to Wishlist - Guest:48)
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:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:142)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:118)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:85)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1562194060967.run(TempTestSuite1562194060967.groovy:35)
=================================================================================
Test Cases/PDP - FAILED.
Reason:
groovy.lang.MissingPropertyException: No such property: data for class: groovy.lang.Binding
at com.kms.katalon.core.util.StrSubstitutor.replace(StrSubstitutor.java:37)
at com.kms.katalon.core.testobject.ObjectRepository.lambda$0(ObjectRepository.java:255)
at com.kms.katalon.core.testobject.ObjectRepository.findWebUIObject(ObjectRepository.java:252)
at com.kms.katalon.core.testobject.ObjectRepository.readTestObjectFile(ObjectRepository.java:206)
at com.kms.katalon.core.testobject.ObjectRepository.findTestObject(ObjectRepository.java:174)
at com.kms.katalon.core.testobject.ObjectRepository.findTestObject(ObjectRepository.java:127)
at com.kms.katalon.core.testobject.ObjectRepository$findTestObject.callStatic(Unknown Source)
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:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:142)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:118)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:85)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1562194060967.run(TempTestSuite1562194060967.groovy:35)
===============================================================================
groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed:
GStringTemplateScript164.groovy: 2: illegal string body character after dollar sign;
solution: either escape a literal dollar sign â$5â or bracket the value expression â${5}â @ line 2, column 42.
plate() { return { out -> out << ââ"//la
^
1 error
at com.kms.katalon.core.util.StrSubstitutor.replace(StrSubstitutor.java:37)
=================================================================================
Reason:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
15: unable to resolve class com.katalon.plugin.keyword.waitforangular.WaitForAngularKeywords
@ line 15, column 1.
import com.katalon.plugin.keyword.waitforangular.WaitForAngularKeywords
^
1 error
at com.kms.katalon.core.main.ScriptEngine.getScript(ScriptEngine.java:199)
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:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:
=======================================================================
Reason:
groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed:
GStringTemplateScript23.groovy: 2: illegal string body character after dollar sign;
solution: either escape a literal dollar sign â$5â or bracket the value expression â${5}â @ line 2, column 248.
cialized_about-us?$hybris-nav$â]) = coun
^
1 error
at com.kms.katalon.core.util.StrSubstitutor.replace(StrSubstitutor.java:37)
at com.kms.katalon.core.testobject.ObjectRepository.lambda$0(ObjectRepository.java:255)
at com.kms.katalon.core.testobject.ObjectRepository.findWebUIObject(ObjectRepository.java:252)
at com.kms.katalon.core.testobject.ObjectRepository.readTestObjectFile(ObjectRepository.java:206)
at com.kms.katalon.core.testobject.ObjectRepository.findTestObject(ObjectRepository.java:
==================================================================================
Hello,
Just noticed that the parameterization of a test object is not functional in Katalon Studio - 6.3.0.rc3-6eaf9894f.
The same code is functional in KS 6.2.0
Thank you,
Cornel
Hello
After finished test suite collection run the result tab showing the result without id/suite name
Please see the screenshot below
Thank you
Iâm not able to use Mobile.startExistingApplication feature of the new Katalon v.6.3.0. Iâve tried the following:
- Spying on an installed application on an android device
- Recording on an installed application on an android device
- Running test case with Mobile.startExistingApplication(âpackage_nameâ)
And all of them ends in this step:
[35m[UiAutomator2]e[39m Server packages are not going to be (re)installed
I can neither record nor spy or run test cases. It always stuck here âServer packages are not going to be (re)installedâ
Any help will be highly appreciated!
OS: Windows 10
Katalon ver: 6.3.0
node ver: 10.16.0
npm ver: 6.9.0
appium ver: 1.14.0
Device type: Physical
Device name: Huawei
Device model: nova 2i
Mobile OS: Android 8.0 Oreo
Let me know if you require any further information.
FYI I also have the Katalon v6.2.2 in the same folder. I donât if this can be the root cause by any chance.
Please show us full of the execution log.
Btw, if you upgrade appium from v1.8.1 to v1.14.0. Please follow these manual instruction:
- Manually remove
io.appium.uiautomator2.server.testandappium.uiautomator2.serverfrom your devices. - Manually delete folder C://<user_folder>/.katalon/tools/android_sdk and let Katalon download again.
Thanks
Hello, I tried using Version 6.3. Everything is working fine. I really liked the dark theme and dynamic test objects feature. Just I am not able to use Plugins with this new version. I have installed and reload the plugins, still I do not see those while adding custom keywords.
@duyluong
Thanks,
Ankit
Hi @duyluong
Iâve performed the tasks youâve mentioned and now Iâm stuck here whenever I try to do anything using the startExistingApplication feature:
The installation of âappium-uiautomator2-server-debug-androidTest.apkâ took 1.824s
Here is the execution log:
e[35m[Appium]e[39m Welcome to Appium v1.14.0
e[35m[Appium]e[39m Non-default server args:
e[35m[Appium]e[39m port: 49886
e[35m[Appium]e[39m loglevel: info
e[35m[Appium]e[39m chromeDriverPort: 49887
e[35m[Appium]e[39m tmpDir: C:\Users\nyk50\AppData\Local\Temp\Katalon\Appium\Temp1565023700125
e[35m[Appium]e[39m Appium REST http interface listener started on 0.0.0.0:49886
e[35m[HTTP]e[39m e[37mâ>e[39m e[37mGETe[39m e[37m/wd/hub/statuse[39m
e[35m[HTTP]e[39m e[90m{}e[39m
e[35m[HTTP]e[39m e[37m<-- GET /wd/hub/status e[39me[32m200e[39m e[90m20 ms - 68e[39m
e[35m[HTTP]e[39m e[90me[39m
e[35m[HTTP]e[39m e[37mâ>e[39m e[37mGETe[39m e[37m/wd/hub/statuse[39m
e[35m[HTTP]e[39m e[90m{}e[39m
e[35m[HTTP]e[39m e[37m<-- GET /wd/hub/status e[39me[32m200e[39m e[90m3 ms - 68e[39m
e[35m[HTTP]e[39m e[90me[39m
e[35m[HTTP]e[39m e[37mâ>e[39m e[37mPOSTe[39m e[37m/wd/hub/sessione[39m
e[35m[HTTP]e[39m e[90m{âdesiredCapabilitiesâ:{âappActivityâ:".Settings",âappPackageâ:âcom.android.settingsâ,ânewCommandTimeoutâ:1800,âplatformVersionâ:â8.0.0â,âautomationNameâ:âuiautomator2â,âautoGrantPermissionsâ:true,âplatformNameâ:âAndroidâ,âudidâ:â8UEDU18112007974â,âdeviceNameâ:âHUAWEI RNE-L22 (Android 8.0.0)â,âplatformâ:âANDROIDâ,âsystemPortâ:8214},âcapabilitiesâ:{âfirstMatchâ:[{âappium:appActivityâ:".Settings",âappium:appPackageâ:âcom.android.settingsâ,âappium:autoGrantPermissionsâ:true,âappium:automationNameâ:âuiautomator2â,âappium:deviceNameâ:âHUAWEI RNE-L22 (Android 8.0.0)â,âappium:newCommandTimeoutâ:1800,âplatformâ:âANDROIDâ,âplatformNameâ:âandroidâ,âappium:platformVersionâ:â8.0.0â,âappium:systemPortâ:8214,âappium:udidâ:â8UEDU18112007974â}]}}e[39m
e[35m[BaseDriver]e[39m The capabilities [âplatformâ] are not standard capabilities and should have an extension prefix
e[35m[Appium]e[39m Appium v1.14.0 creating new AndroidUiautomator2Driver (v1.33.1) session
e[35m[Appium]e[39m Capabilities:
e[35m[Appium]e[39m platform: ANDROID
e[35m[Appium]e[39m platformName: android
e[35m[Appium]e[39m appActivity: .Settings
e[35m[Appium]e[39m appPackage: com.android.settings
e[35m[Appium]e[39m autoGrantPermissions: true
e[35m[Appium]e[39m automationName: uiautomator2
e[35m[Appium]e[39m deviceName: HUAWEI RNE-L22 (Android 8.0.0)
e[35m[Appium]e[39m newCommandTimeout: 1800
e[35m[Appium]e[39m platformVersion: 8.0.0
e[35m[Appium]e[39m systemPort: 8214
e[35m[Appium]e[39m udid: 8UEDU18112007974
e[35m[BaseDriver]e[39m The following capabilities were provided, but are not recognized by Appium:
e[35m[BaseDriver]e[39m platform
e[35m[BaseDriver]e[39m Session created with session id: b5fa128f-31d7-4b1c-a66f-c0c77ca3e0d1
e[35m[ADB]e[39m Found 1 âbuild-toolsâ folders under âC:\Users\nyk50.katalon\tools\android_sdkâ (newest first):
e[35m[ADB]e[39m C:/Users/nyk50/.katalon/tools/android_sdk/build-tools/29.0.1
e[35m[ADB]e[39m Using âadb.exeâ from âC:\Users\nyk50.katalon\tools\android_sdk\platform-tools\adb.exeâ
e[35m[AndroidDriver]e[39m Retrieving device list
e[35m[AndroidDriver]e[39m Using device: 8UEDU18112007974
e[35m[ADB]e[39m Using âadb.exeâ from âC:\Users\nyk50.katalon\tools\android_sdk\platform-tools\adb.exeâ
e[35m[AndroidDriver]e[39m No app sent in, not parsing package/activity
e[35m[ADB]e[39m Using âaapt.exeâ from âC:\Users\nyk50.katalon\tools\android_sdk\build-tools\29.0.1\aapt.exeâ
e[35m[ADB]e[39m Using âapksigner.batâ from âC:\Users\nyk50.katalon\tools\android_sdk\build-tools\29.0.1\apksigner.batâ
e[35m[UiAutomator2]e[39m Server packages are going to be (re)installed
e[35m[ADB]e[39m The application at âC:\Users\nyk50\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v3.7.0.apkâ is already cached to â/data/local/tmp/appium_cache/fe3aa6662b6c999cf661d7626a50da395fd786f4.apkâ
e[35m[ADB]e[39m The installation of âappium-uiautomator2-server-v3.7.0.apkâ took 5.451s
e[35m[ADB]e[39m The application at âC:\Users\nyk50\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apkâ is already cached to â/data/local/tmp/appium_cache/803351851ae3c5e95b3b134df12ac4dc20f5da62.apkâ
e[35m[ADB]e[39m The installation of âappium-uiautomator2-server-debug-androidTest.apkâ took 1.824s
Please reach out to me if you have any further queries in order to debug this issue.
Thanks for your prompt response! 
You may try to add: appWaitActivity: * property in Project Settings/Desired Capabilities/Mobile/Android and try to run again.
If KS could not start the app, please show us more message. The Appium log above was not the full exception log.
Thanks
Hi @duyluong, I highly appreciate your cooperation. As per your instruction, Iâve added appWaitActivity: * property in Project Settings/Desired Capabilities/Mobile/Android and tried to run again. Unfortunately, I didnât had any better luck even this time. KS is not throwing any exception, itâs just stuck at:
The installation of âappium-uiautomator2-server-debug-androidTest.apkâ took 2.045s
Besides the above Appium log, I donât have much in my hand as of now. If you can kindly instruct me any further on how to fetch additional logs that might help in debugging would be appreciated.
Thanks & Regards,
Noor Yeaser Khan



