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

WebView TypeText not working #4426

Closed
2 tasks done
alexandravychytill opened this issue Mar 28, 2024 · 7 comments · Fixed by #4427
Closed
2 tasks done

WebView TypeText not working #4426

alexandravychytill opened this issue Mar 28, 2024 · 7 comments · Fixed by #4427

Comments

@alexandravychytill
Copy link

What happened?

When running on iOS type text functions is not working, even though on android it works.

Log:
Test Failed: Failed to evaluate JavaScript on web view: <RNCWKWebView: 0x1078ba000; frame = (0 0; 393 713.333); gestureRecognizers = <NSArray: 0x600000ce33f0>; backgroundColor = UIExtendedSRGBColorSpace 1 1 1 1; layer = <CALayer: 0x6000005577c0>>. JS exception: The input element's type ('email') does not support selection.

Code:
await web.element(by.web.id('identifier')).typeText('Hello World!');

What was the expected behaviour?

TypeText should work

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version: 20.19.4
React Native version: 0.72.0
Has Fabric (React Native's new rendering system) enabled: yes
Node version: >=16
Device model: iPhone 15
iOS version: 17.2
macOS version: 14.4
Xcode version: 15.2
Test-runner (select one): jest

Detox logs

Detox logs
Test Failed: Failed to evaluate JavaScript on web view: <RNCWKWebView: 0x1078ba000; frame = (0 0; 393 713.333); gestureRecognizers = <NSArray: 0x600000ce33f0>; backgroundColor = UIExtendedSRGBColorSpace 1 1 1 1; layer = <CALayer: 0x6000005577c0>>. JS exception: The input element's type ('email') does not support selection.

Device logs

Device logs
paste your device.log here!

More data, please!

No response

@asafkorem
Copy link
Contributor

I'm able to reproduce this @alexandravychytill. Investigating

@asafkorem
Copy link
Contributor

Related: https://w3.org/Bugs/Public/show_bug.cgi?id=24796
Working on a workaround 🙂

@asafkorem
Copy link
Contributor

Hey @alexandravychytill, a fix for this issue was released with the latest Detox version (20.19.5).

@asafkorem asafkorem mentioned this issue Apr 2, 2024
2 tasks
@swain
Copy link

swain commented Sep 17, 2024

@asafkorem I'm still seeing this issue on Detox 20.20.3. The field focuses, but the text does not get typed.

@aliub145
Copy link

aliub145 commented Nov 6, 2024

@asafkorem I am still hitting this issue too, same as @swain - the field focuses but the text does not get typed. I will open up a new issue to track this

@asafkorem
Copy link
Contributor

Thanks for the report @aliub145 @swain , I'll check the new issue soon. For now, if you could create some reproduction project / snippets for me it will be very helpful and might shorten the time for you to wait for the investigation 🙂

@pang0018
Copy link

pang0018 commented Nov 13, 2024

Thanks for the report @aliub145 @swain , I'll check the new issue soon. For now, if you could create some reproduction project / snippets for me it will be very helpful and might shorten the time for you to wait for the investigation 🙂

@asafkorem I made a reproduction project for iOS. I removed the node_modules and ios/Pods folder to make it smaller. Make sure you you disable new architecture with RCT_NEW_ARCH_ENABLED=0 pod install

detoxWebTester.zip

Not the web view library is 13.6.4. It's not the latest and we are restricted to that version since we are still on expo 50 in our app.

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

Successfully merging a pull request may close this issue.

5 participants