Selenium Webdriver C# : Need help accessing the Elements inside iFrame -
i having iframe inside overlaywindow , not able access iframe , element. have lots of menus inside iframe , need test that.
the html code looks below:
<div class="exp overlaycontainer" style=""> <div class="overlaybackground"></div> <div class="overlaywindow" style="position: absolute;"> <div class="overlaywindowinner" style="top: 30px; left: -410px;"> <div id="closetab"> <iframe class="overlaywindowcontent" frameborder="0" src="/templates/frame_loading.html?/my-exp/pers...
i using below selenium code locate iframe
iwebelement detailframe = driver.findelement(by.xpath("//iframe[@class='overlaywindowcontent']")); driver.switchto().frame(detailframe);
but getting below error message.
frameelement cannot converted remotewebelement
let me know comments
i had same problem , used driver.switchto().frame(0);
, worked fine me.
Comments
Post a Comment