Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable send text to textfield in app #100

Open
pseudox07 opened this issue Sep 30, 2024 · 4 comments
Open

Unable send text to textfield in app #100

pseudox07 opened this issue Sep 30, 2024 · 4 comments

Comments

@pseudox07
Copy link

I have been trying to send text to a text field in a Sample App. Similar issue with #96, I have attached the sample app file

Below are my codes and logs
logs 1.txt

Codes
`
describe("Launch App and check for elements", () => {
it("should enter the text", async () => {

try {
  const title = await browser.flutterByValueKey$("txt_text_field");
  title.isDisplayed();
  title.click();
  await browser.flutterByValueKey$("txt_text_field").addValue("12345");
} catch (error) {
  console.error("Error adding username:", error);
}`

I called the addValue function but not API request on sending the text value to the Appium in the log.

@sudharsan-selvaraj
Copy link
Member

sudharsan-selvaraj commented Sep 30, 2024

What happens if you call await title.addValue("12345");

@pseudox07
Copy link
Author

pseudox07 commented Sep 30, 2024

I still couldn't see the API request to send the text using below codes
image

and got error

[AppiumDriver@9743] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up at JWProxy.command (/Users/ec2-user/automation/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:350:13) at processTicksAndRejections (node:internal/process/task_queues:95:5)

below are full log

logs 2.txt

And my code exception catch this

Error adding username: Error: Malformed type for "text" parameter of command elementSendKeys
[0-0] Expected: string
[0-0] Actual: object
[0-0]
[0-0] For more info see
https://w3c.github.io/webdriver/#dfn-element-send-keys
[0-0]
[0-0] at Element.protocolCommand (/Users/ec2-user/automation/node_modules/webdriver/build/index.js:1458:15)
[0-0] at Element.wrapCommandFn (/Users/ec2-user/automation/node_modules/@wdio/utils/build/index.js:1370:32)
[0-0] at async Element.wrapCommandFn (file:///Users/ec2-user/automation/node_modules/wdio-flutter-by-service/node_modules/@wdio/utils/build/shim.js:90:29)

@saikrishna321
Copy link
Member

@pseudox07 The logs say anything about the issue you are mentioning.

 Encountered internal error running command: NoSuchDriverError: A session is either terminated or not started

driver is quit and then you are trying to accessing the session. Please check client code that after deleteSession is called you need to create a new session.

@pseudox07
Copy link
Author

pseudox07 commented Sep 30, 2024

I suspected the session is stopped and deleted once we send the keys due to crash when below errors are thrown during addValue function is being called,

Error adding username: Error: Malformed type for "text" parameter of command elementSendKeys
[0-0] Expected: string
[0-0] Actual: object
[0-0]
[0-0] For more info see
https://w3c.github.io/webdriver/#dfn-element-send-keys
[0-0]
[0-0] at Element.protocolCommand (/Users/ec2-user/automation/node_modules/webdriver/build/index.js:1458:15)
[0-0] at Element.wrapCommandFn (/Users/ec2-user/automation/node_modules/@wdio/utils/build/index.js:1370:32)
[0-0] at async Element.wrapCommandFn (file:///Users/ec2-user/automation/node_modules/wdio-flutter-by-service/node_modules/@wdio/utils/build/shim.js:90:29)

I am not sure what you mean on the client code, can you help to have a look on the config file and test script
Automation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants