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

Facing issue while accessing elements within Iframe #2651

Open
selvaganesan2005 opened this issue Oct 11, 2022 · 2 comments
Open

Facing issue while accessing elements within Iframe #2651

selvaganesan2005 opened this issue Oct 11, 2022 · 2 comments

Comments

@selvaganesan2005
Copy link

selvaganesan2005 commented Oct 11, 2022

We are testing an UI app (Technology - Angular) which has "Iframe" elements.
There is a #document(html ->body-.>div->input) structure inside the Iframe .
We need to access the textbox elements inside the html structure within the Iframe. These elements are not located when we tried to access it using taiko (used different locators such as visible text, Id , relative & full xpath). Please help us resolving this issue. taiko version is 1.3.2.

@marques-work
Copy link
Contributor

marques-work commented Dec 3, 2022

Have you tried the $ selector? You can pass it a function that uses the native DOM api.

What I would try is to pass in a function that uses document.querySelector("iframe").contentDocument.querySelector("input[type='text']") to get a handle on an element within an iframe and try manipulating that?

@ghost
Copy link

ghost commented Dec 10, 2022

@selvaganesan2005 I was facing the same issue a while ago. I could just solve this issue by running the tests in headless mode in which I had no problems accessing elements inside an iframe. But we could not solve the issue to access the elements in headful mode.

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

No branches or pull requests

2 participants