I have a following iframe section which i would like to use for further actions
<div class="addonWrapper"><div class="detailhead mobileonly">
<div class="cancelbtn cancelmobileiframebtn" title="Zurück" onclick="closeMobileIFrame()"></div></div>
<iframe src="https://abcd.php?stage=1&access_token=zrhrhha8b-621bb319cd38d-1348650f57bf2b8d70fbc84d95b747ab" style="width: 100%; height: 100%; border: none;"></iframe>
</div>
i have tried to do something like this.
this.iframeM = Selector('iframe').withAttribute(
'src',
'https://abcd.php?stage=1&access_token=zrhrhha8b-621bb319cd38d-1348650f57bf2b8d70fbc84d95b747ab'
);
then in the test
await t.switchToIframe(mPage.iframeM);
But its not successful. I keep getting the error "The specified selector does not match any element in the DOM tree.!"
What is the best way to identify the iframe in this case where only src is available. Help would be deeply appreciated.
Can you try following ?
https:\/\/abcd.php\?stage=1.*
this.iframeM = Selector('iframe').withAttribute(
'src',/https:\/\/abcd.php\?stage=1.*/
);
Reference : Selector with .withAttribute Method
Increase the timeout value for iFrame Reference : Increase the timeout value for the iFrame
Run the test in debug mode Run the test in debug mode and execute the iFrame specific code when the frame is loaded.