How to lock mobile device?

So I can see there is a Unlock Device command in Katalon which works great. Is there a way to or a command to lock the device?

Hi @mohammad.arif,

To Lock / Unlock device, you could get Appium driver instance from MobileDriverFactory and do it by yourself /=)

import io.appium.java_client.AppiumDriver
import io.appium.java_client.MobileElement

AppiumDriver<MobileElement> driver = MobileDriverFactory.getDriver()

Hi @thongnmtran - once again thank you so much for this advice, it works beautifully!

1 Like