-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Did you test using the latest Detox?
- I have tested this issue on the latest Detox release and it still reproduces.
Did your test fail and you're not sure why?
- I have read the troubleshooting guide and it didn't help me.
What happened?
On iOS, typeText() and replaceText() do not work for WebView input elements, both when using asSecured() and without it.
Before the webView screen, we use device.disableSynchronization()
The same WebView interaction works correctly on Android.
<![CDATA["<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xmlns=""> <div id="editor" style="display: none;"> <div class="ck ck-reset ck-editor ck-rounded-corners" role="application" dir="ltr" lang="en" aria-labelledby="ck-editor__label_ed711920f6203078eb2fbb55827b54445"><label class="ck ck-label ck-voice-label" id="ck-editor__label_ed711920f6203078eb2fbb55827b54445">Rich Text Editor<div class="ck ck-editor__top ck-reset_all" role="presentation"><div class="ck ck-sticky-panel"><div class="ck ck-sticky-panel__placeholder" style="display: none;"><div class="ck ck-sticky-panel__content"><div class="ck ck-toolbar" role="toolbar" aria-label="Editor toolbar" tabindex="-1"><div class="ck ck-toolbar__items"><button class="ck ck-button ck-disabled ck-off" type="button" tabindex="-1" aria-labelledby="ck-editor__aria-label_e8e0c52bf1ca5a72669f45badc31878ea" aria-disabled="true" data-cke-tooltip-text="Undo (Ctrl+Z)" data-cke-tooltip-position="s"><svg xmlns="http://www.w3.org/2000/svg" class="ck ck-icon ck-reset_all-excluded ck-icon_inherit-color ck-button__icon" viewBox="0 0 20 20"><path d="m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z"/><span class="ck ck-button__label" id="ck-editor__aria-label_e8e0c52bf1ca5a72669f45badc31878ea">Undo<button class="ck ck-button ck-disabled ck-off" type="button" tabindex="-1" aria-labelledby="ck-editor__aria-label_e373e66bb29734fbfe63456771f3a8cc7" aria-disabled="true" data-cke-tooltip-text="Redo (Ctrl+Y)" data-cke-tooltip-position="s"><svg xmlns="http://www.w3.org/2000/svg" class="ck ck-icon ck-reset_all-excluded ck-icon_inherit-color ck-button__icon" viewBox="0 0 20 20"><path d="m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z"/><span class="ck ck-button__label" id="ck-editor__aria-label_e373e66bb29734fbfe63456771f3a8cc7">Redo<span class="ck ck-toolbar__separator"><button class="ck ck-button ck-off" type="button" tabindex="-1" aria-labelledby="ck-editor__aria-label_ed9f62326e9702f6ab51ea6164b0d65d9" aria-pressed="false" data-cke-tooltip-text="Bold (Ctrl+B)" data-cke-tooltip-position="s"><svg xmlns="http://www.w3.org/2000/svg" class="ck ck-icon ck-reset_all-excluded ck-icon_inherit-color ck-button__icon" viewBox="0 0 20 20"><path d="M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z"/><span class="ck ck-button__label" id="ck-editor__aria-label_ed9f62326e9702f6ab51ea6164b0d65d9">Bold<button class="ck ck-button ck-off" type="button" tabindex="-1" aria-labelledby="ck-editor__aria-label_e9271130796c47861ceaf68818718bda3" aria-pressed="false" data-cke-tooltip-text="Italic (Ctrl+I)" data-cke-tooltip-position="s"><svg xmlns="http://www.w3.org/2000/svg" class="ck ck-icon ck-reset_all-excluded ck-icon_inherit-color ck-button__icon" viewBox="0 0 20 20"><path d="m9.586 14.633.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z"/><span class="ck ck-button__label" id="ck-editor__aria-label_e9271130796c47861ceaf68818718bda3">Italic<span class="ck ck-toolbar__separator"><button class="ck ck-button ck-off" type="button" tabindex="-1" aria-labelledby="ck-editor__aria-label_e23fe7edc5e68f29c1d8321ced9e348be" aria-pressed="false" data-cke-tooltip-text="Numbered List" data-cke-tooltip-position="s"><svg xmlns="http://www.w3.org/2000/svg" class="ck ck-icon ck-reset_all-excluded ck-icon_inherit-color ck-button__icon" viewBox="0 0 20 20"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM3.5 3v5H2V3.7H1v-1h2.5V3zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001c-.048.405-.16.734-.333.988-.175.254-.59.692-1.244 1.312H4.3v1h-4l.043-.043zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/><span class="ck ck-button__label" id="ck-editor__aria-label_e23fe7edc5e68f29c1d8321ced9e348be">Numbered List<button class="ck ck-button ck-off" type="button" tabindex="-1" aria-labelledby="ck-editor__aria-label_ebf9bdc471f4d67c514ba8988a268a21c" aria-pressed="false" data-cke-tooltip-text="Bulleted List" data-cke-tooltip-position="s"><svg xmlns="http://www.w3.org/2000/svg" class="ck ck-icon ck-reset_all-excluded ck-icon_inherit-color ck-button__icon" viewBox="0 0 20 20"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75zm6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75z"/><span class="ck ck-button__label" id="ck-editor__aria-label_ebf9bdc471f4d67c514ba8988a268a21c">Bulleted List<div class="ck ck-editor__main" role="presentation"><div class="ck-blurred ck ck-content ck-editor__editable ck-rounded-corners ck-editor__editable_inline" lang="en" dir="ltr" role="textbox" aria-label="Editor editing area: main" contenteditable="true">
The content"
<div class="ck-body-wrapper"><div class="ck ck-reset_all ck-body ck-rounded-corners" dir="ltr">"] ]>What was the expected behaviour?
typeText() - have to type text in the webView input
replaceText()- remove and paste text
Help us reproduce this issue!
No response
In what environment did this happen?
Detox version: 20.46.0
React Native version: 0.79.5
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version: 24.11.0
Device model: IPhone 16 Pro
iOS version: 18.1
Test-runner (select one): jest
Detox logs
Detox logs
TRACE: i ws-client send message
data: {"type":"invoke","params":{"type":"webAction","webPredicate":{"type":"xpath","value":"//*[@role=\"textbox\" and @aria-label=\"Editor editing area: main\"]"},"webAction":"typeText","params":["Automation modified text"]},"messageId":113}
TRACE: B ws-client perform web view action: type input text: "Automation modified text" in content editable
data: {
"type": "webAction",
"webPredicate": {
"type": "xpath",
"value": "//*[@role=\"textbox\" and @aria-label=\"Editor editing area: main\"]"
},
"webAction": "typeText",
"params": [
"Automation modified text"
]
}
stack: EntryDetailsPage.typeText [as openAndPerformSummaryFullScreenAction] (/pages/EntryDetailsPage.ts:182:20)
processTicksAndRejections (node:internal/process/task_queues:105:5)
Object.<anonymous> (/tests/e2e/pma/EntryDetails/summaryWidgets.test.ts:151:3)
RUNS tests/e2e/pma/EntryDetails/summaryWidgets.test.ts
TRACE: i ws-server@64969 get
data: {"type":"invoke","params":{"type":"webAction","webPredicate":{"type":"xpath","value":"//*[@role=\"textbox\" and @aria-label=\"Editor editing area: main\"]"},"webAction":"typeText","params":["Automation modified text"]},"messageId":113}
TRACE: i ws-server@65432 send
data: {
"type": "invoke",
"params": {
"type": "webAction",
"webPredicate": {
"type": "xpath",
"value": "//*[@role=\"textbox\" and @aria-label=\"Editor editing area: main\"]"
},
"webAction": "typeText",
"params": [
"Automation modified text"
]
},
"messageId": 113
RUNS tests/e2e/pma/EntryDetails/summaryWidgets.test.ts
TRACE: i ws-server@65432 get
data: {"type":"invokeResult","params":{},"messageId":113}
TRACE: i ws-server@64969 send
data: {
"type": "invokeResult",
"params": {},
TRACE: i ws-client get message
data: {"type":"invokeResult","params":{},"messageId":113}
TRACE: E ws-client perform web view action: type input text: "Automation modified text" in content editable
Device logs
Device logs
paste your device.log here!
More data, please!
No response