Insert code in edit text box



Hi everyone, I’m trying to enter context into this textbox and encounter this problem. Have any one here got the same problem as mine.

1 Like

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.

Thanks!

Hi there, :wave:

Welcome back to our forum.

Can you help us to copy the error code in your image and paste them here in the thread?

Thanks,
Albert

=============== ROOT CAUSE =====================
Caused by: org.openqa.selenium.InvalidElementStateException: Screen rotation cannot be changed to ROTATION_270 after 2000ms. Is it locked programmatically?

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html
================================================

08-22-2024 08:44:57 AM Test Cases/Android/UsabilityManagement/5.ViewCameraLandScape/C100X_Android_2_5_View_Camera_Landscape

Elapsed time: 26.372s

Test Cases/Android/UsabilityManagement/5.ViewCameraLandScape/C100X_Android_2_5_View_Camera_Landscape FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to switch the device to landscape mode (Root cause: org.openqa.selenium.InvalidElementStateException: Screen rotation cannot be changed to ROTATION_270 after 2000ms. Is it locked programmatically?
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'WS0465', ip: '10.228.101.72', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_282'
Driver info: com.kms.katalon.core.appium.driver.SwipeableAndroidDriver
Capabilities {appActivity: .Settings, appPackage: com.android.settings, autoGrantPermissions: true, chromedriverPort: 53962, databaseEnabled: false, desired: {appActivity: .Settings, appPackage: com.android.settings, autoGrantPermissions: true, chromedriverPort: 53962, deviceId: R58RB1SBSKA, deviceName: samsung SM-A225F (Android ), newCommandTimeout: 1800, platform: ANDROID, platformName: android, systemPort: 8296, udid: R58RB1SBSKA}, deviceApiLevel: 33, deviceId: R58RB1SBSKA, deviceManufacturer: samsung, deviceModel: SM-A225F, deviceName: R58RB1SBSKA, deviceScreenDensity: 300, deviceScreenSize: 720x1600, deviceUDID: R58RB1SBSKA, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 1800, pixelRatio: 1.875, platform: ANDROID, platformName: Android, platformVersion: 13, statBarHeight: 53, systemPort: 8296, takesScreenshot: true, udid: R58RB1SBSKA, viewportRect: {height: 1399, left: 0, top: 53, width: 720}, warnings: {}, webStorageEnabled: false}
Session ID: 71db2cb3-7643-4585-a48d-3279973dfe98
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
	at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
	at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
	at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
	at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
	at com.kms.katalon.core.appium.driver.SwipeableAndroidDriver.execute(SwipeableAndroidDriver.java:1)
	at io.appium.java_client.AppiumDriver.rotate(AppiumDriver.java:242)
	at com.kms.katalon.core.mobile.keyword.builtin.SwitchToLandscapeKeyword$_switchToLandscape_closure1.doCall(SwitchToLandscapeKeyword.groovy:72)
	at com.kms.katalon.core.mobile.keyword.builtin.SwitchToLandscapeKeyword$_switchToLandscape_closure1.call(SwitchToLandscapeKeyword.groovy)
	at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:21)
	at com.kms.katalon.core.mobile.keyword.builtin.SwitchToLandscapeKeyword.switchToLandscape(SwitchToLandscapeKeyword.groovy:67)
	at com.kms.katalon.core.mobile.keyword.builtin.SwitchToLandscapeKeyword.execute(SwitchToLandscapeKeyword.groovy:62)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
	at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.switchToLandscape(MobileBuiltInKeywords.groovy:1888)
	at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$switchToLandscape$0.call(Unknown Source)
	at C100X_Android_2_5_View_Camera_Landscape.run(C100X_Android_2_5_View_Camera_Landscape:15)
	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:448)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:144)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:135)
	at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
	at TempTestCase1724291086537.run(TempTestCase1724291086537.groovy:25)
)
	at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:51)
	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.SwitchToLandscapeKeyword.switchToLandscape(SwitchToLandscapeKeyword.groovy:67)
	at com.kms.katalon.core.mobile.keyword.builtin.SwitchToLandscapeKeyword.execute(SwitchToLandscapeKeyword.groovy:62)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
	at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.switchToLandscape(MobileBuiltInKeywords.groovy:1888)
	at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$switchToLandscape$0.call(Unknown Source)
	at C100X_Android_2_5_View_Camera_Landscape.run(C100X_Android_2_5_View_Camera_Landscape:15)
	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:448)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:144)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:135)
	at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
	at TempTestCase1724291086537.run(TempTestCase1724291086537.groovy:25)
Caused by: org.openqa.selenium.InvalidElementStateException: Screen rotation cannot be changed to ROTATION_270 after 2000ms. Is it locked programmatically?
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'WS0465', ip: '10.228.101.72', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_282'
Driver info: com.kms.katalon.core.appium.driver.SwipeableAndroidDriver
Capabilities {appActivity: .Settings, appPackage: com.android.settings, autoGrantPermissions: true, chromedriverPort: 53962, databaseEnabled: false, desired: {appActivity: .Settings, appPackage: com.android.settings, autoGrantPermissions: true, chromedriverPort: 53962, deviceId: R58RB1SBSKA, deviceName: samsung SM-A225F (Android ), newCommandTimeout: 1800, platform: ANDROID, platformName: android, systemPort: 8296, udid: R58RB1SBSKA}, deviceApiLevel: 33, deviceId: R58RB1SBSKA, deviceManufacturer: samsung, deviceModel: SM-A225F, deviceName: R58RB1SBSKA, deviceScreenDensity: 300, deviceScreenSize: 720x1600, deviceUDID: R58RB1SBSKA, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 1800, pixelRatio: 1.875, platform: ANDROID, platformName: Android, platformVersion: 13, statBarHeight: 53, systemPort: 8296, takesScreenshot: true, udid: R58RB1SBSKA, viewportRect: {height: 1399, left: 0, top: 53, width: 720}, warnings: {}, webStorageEnabled: false}
Session ID: 71db2cb3-7643-4585-a48d-3279973dfe98
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
	at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
	at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
	at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
	at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
	at com.kms.katalon.core.appium.driver.SwipeableAndroidDriver.execute(SwipeableAndroidDriver.java:1)
	at io.appium.java_client.AppiumDriver.rotate(AppiumDriver.java:242)
	at com.kms.katalon.core.mobile.keyword.builtin.SwitchToLandscapeKeyword$_switchToLandscape_closure1.doCall(SwitchToLandscapeKeyword.groovy:72)
	at com.kms.katalon.core.mobile.keyword.builtin.SwitchToLandscapeKeyword$_switchToLandscape_closure1.call(SwitchToLandscapeKeyword.groovy)
	at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:21)
	... 17 more

Your component loaded fully in UI?
is the element interact-able and visible? is it enabled ?

As @dineshh says, ensure your object is visible:

and even exists:

and/or is present before you try to interact with it.

You also might want to ensure you have enough attributes selected to uniquely identify your object.

1 Like