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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -