HTML Looks like this
<iframe src="/apex/cscfga__ConfigureProduct?linkedId=a0W8E000000Lpa5UAC&configId=a0Z8E000000NBGMUA4&retURL=/a0W8E000000Lpa5UAC&isdtp=vw" width="100%" height="100%" onload="hideLoading()" frameborder="0" style="height: 737px;"></iframe>
Select frame doesnt work without id.How should my robot script recognise this iframe(without id)?
My script looks like
${Iframe}= Execute Javascript
window.document.getElementsByTagName('iframe')[2]
log ${Iframe}
But it returns 'None'
Please suggest how do I identify this iframe.
Select Frame will work with any type of locator. For example, if it's the only iframe on the page you can do this:
select frame xpath=//iframe
If there are multiple iframes on the page, you need to try to find an ancestor that is uniquely identifiable and then look for the frame relative to that.
For example, given the following html:
<div class="spreadsheet_container">
<div>
<iframe ...>
... you can use an xpath such as the following:
select frame xpath=//div[@class='spreadsheet_container']/div/iframe
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With