There is a iframe which is embedded in another iframe in a page. I need to do action in elements which is present in child iframe and exactly here facing an error to perform action on element.
rough html is as follows:
<html>
<body>
<iframe src="https://...">
<iframe src="htpps://...">
<input type='text' id='search' >
<button>Click Me></button>
</iframe>
</iframe>
</body>
</html>`
I used the following approach to handle it but i'm unsuccesful i.e.., capturing the first iframe using frameLocator and storing it in frame variable and using frame variable i tried to capture another iframe.
const frame= await this.page.frameLocator("//iframe[contains(@id,'easyXDM_default')]")
await frame.frameLocator("//iframe[@src='url of the iframe site']").fill("#search",'bnma')
Error:
TypeError: iframe.frameLocator(...).fill is not a function