Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Not able to interact with element located on iframe in webview #4877

@anton-vorobkalo

Description

@anton-vorobkalo

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?

Hybrid app. During test executions need to fill credit card values located on iframe in webview. Not able to locate and interact with inputs. Find workaround for Android using await device.getUiDevice().pressKeyCode(keyCode);. iOS platform not allowed to use same approach

Image

Is there any implementation or solution to handle iframe similar to selenium driver.switch_to.frame() ?

What was the expected behaviour?

Set input values on iframe located in webview using methods Detox.WebElementActions.typeText and Detox.WebElementActions.replaceText similar to same action with webview elements

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version: 20.46.0
React Native version: 0.77.3
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version: 22.17.0
Test-runner (select one): jest

Detox logs

Detox logs
Test Failed: Failed to evaluate JavaScript on web view: <WKWebView: 0x11b01d400; frame = (0 0; 440 820); backgroundColor = UIExtendedSRGBColorSpace 1 1 1 1; layer = <CALayer: 0x600000e09c80>>. JS exception: Element not found

Device logs

Device logs
paste your device.log here!

More data, please!

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions