I have tried 3 way to send a text to the text box on flutter App but every time I found error, my followed ways & findings (error) are given below-
1.Mobile.sendKeys(findTestObject(‘Object Repository/TV_App/android.widget.EditText0 - Input’), ‘testMim’)
Error:-
Cannot send keys ‘testMim’ on test object ‘Object Repository/TV_App/android.widget.EditText0 - Input’. (Root cause: org.openqa.selenium.InvalidElementStateException: Cannot set the element to ‘testMim’. Did you interact with the correct element?
- AppiumDriver<?> driver = MobileDriverFactory.getDriver()
TestObject element = ObjectRepository.findTestObject(‘ObjectRepository/TV_App/android.widget.EditText0 - Input’)
JavascriptExecutor jse = (JavascriptExecutor)driver
jse.executeScript(“arguments[0].value=‘enter the value here’;”, element )
Error:-
- Argument is of an illegal type: com.kms.katalon.core.testobject.TestObject
at org.openqa.selenium.remote.internal.WebElementToJsonConverter.apply(WebElementToJsonConverter.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:484)
3.Mobile.tap(findTestObject(‘Object Repository/TV_App/android.widget.EditText0 - Input’), 0)
Mobile.delay(03)
Mobile.setText(findTestObject(‘Object Repository/TV_App/android.widget.EditText0 - Input’), ‘TestMim’, 0)
Error:-
com.kms.katalon.core.exception.StepFailedException: Failed to set text into element (Root cause: org.openqa.selenium.InvalidElementStateException: Cannot set the element to ‘TestMim’. Did you interact with the correct element?
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
@duyluong @Chris_Trevarthen Could you please help me by giving the solution, I’m badly needed as my current project developed on Flutter?