How to create dynamic object repository with appium script?

Hi there,

i’m used katalon studio 9.xx before and this script was fine

import com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory
import io.appium.java_client.android.AndroidDriver
import io.appium.java_client.MobileElement

@Keyword
	def appiumObjId(String tittle){

		AndroidDriver driver = MobileDriverFactory.driver
		MobileElement objElement = (MobileElement)driver.findElementByAndroidUIAutomator('new UiSelector().description("'+tittle+'")')

		return objElement
	}

then i update to katalon studio 10 with appium 2.xxx and
error by import io.appium.java_client.MobileElement

is any way to solved this?

1 Like

Hi @joko,

Welcome to our community. Thank you for letting us know your issue.

Can you please help follow this release note: Katalon Studio Release Notes: Version 10.x | Katalon Docs to update the compatible Appium version? Otherwise, if it does not work, please share the error log / screenshot for better support?

Thank you

You need to switch to using WebElement instead of MobileElement.
You can refer to the update information here v7-to-v8-migration-guide

1 Like

as you can see MobileElement getting error

Screenshot 2025-03-20 at 13.59.54

If this is for KS, you need to read the release notes. In the release notes, it states you have to change “MobileElement” to WebElement as @le.duc.anh stated.