- Nandu
- Posts : 4
Join date : 2012-04-16
Web Driver: Unable to click a link present inside the frame of a frameset
Thu May 17, 2012 1:52 pm
Unable to click a link present inside the frame of a frameset
<!--<html>
<head>
<frameset id="mainFrameSet" rows="*">
<frame id="headerPlusFrame" scrolling="no" marginwidth="0" marginheight="0" src="../listing/headerPlus.do?lastPage=home" title="Main" name="headerPlusFrame">
<html>
<head>
<body onload="onLoad()">
<table cellspacing="0" cellpadding="0" border="0" bgcolor="#F6F6FB" style="height: 100%; width: 100%">
<tbody>
<tr>
<tr style="height: 100%;">
<td style="padding:2px" colspan="4">
<iframe id="dataFrame" width="100%" height="100%" frameborder="0" marginwidth="0" marginheight="0" src="data.do" title="Data" name="dataFrame">
<html>
<head>
<frameset id="dataFrameSet" rows="*,20">
<frameset id="centerFrameset" cols="*,0">
<frame id="workspaceFrame" frameborder="0" border="0" framespacing="2" title="Workspace" src="workspace.do" name="workspaceFrame">
<html>
<head>
<frameset id="workspaceFrameSet" class="panelFrame" border="0" framespacing="0" frameborder="0" rows="18,*">
<frame id="workspaceHeaderFrame" scrolling="no" noresize="" marginwidth="0" marginheight="0" src="workspaceHeader.do?title=" title="Workspace Header" name="workspaceHeaderFrame">
<frame id="workspaceBodyFrame" noresize="" marginwidth="0" marginheight="0" src="../listing/home.do" title="Workspace Body" name="workspaceBodyFrame">
<html>
<head>
<body onload="onLoad()">
<script language="javascript">
<table width="100%">
<table width="92%" cellspacing="4" cellpadding="4" border="0" align="center">
<tbody>
<tr>
<td width="500px" valign="top">
<table width="400px" cellspacing="2" cellpadding="2" border="0">
<tbody>
<tr>
<tr>
<tr>
<tr>
<td class="homepage">
<img id="doclistImage" border="0" align="left" src="../res/general/folder.gif" alt="Document List">
<a class="homepage" href="javascript:showDocumentList()">Document List</a>
</td>
</tr>
<tr>
<tr>
<tr>
<tr>
</tbody>
</table>
</td>
<td width="500px" valign="top">
</tr>
</tbody>
</table>
</body>
</html>
</frame>
</frameset>
</html>
</frame>
<frame id="rightFrame" frameborder="0" border="0" framespacing="2" title="Encyclopedia" src="../jsp/listing/blank.jsp" name="rightFrame">
</frameset>
<frame id="discussionsFrame" frameborder="0" framespacing="2" border="0" noresize="" src="discussions.do" title="Discussions" name="discussionsFrame">
</frameset>
</html>
</iframe>
</td>
</tr>
</tbody>
</table>
<iframe id="autoNavFrame" src="javascript:parent.empty();" style="width:100%;height:100%;display: none;" title="Main" name="autoNavFrame">
<a id="startLink_iconMenu_menu_btnApplications" onfocus="_CW.MenuWidget_keepFocus('iconMenu_menu_btnApplications');return false;" href="javascript:void(0)" style="position:absolute;left:-30px;top:-30px; visibility:hidden"></a>
<a id="endLink_iconMenu_menu_btnApplications" onfocus="_CW.MenuWidget_keepFocus('iconMenu_menu_btnApplications');return false;" href="javascript:void(0)" style="position:absolute;left:-30px;top:-30px; visibility:hidden"></a>
</body>
</html>
</frame>
</frameset>
</html>-->
I tried the following but it didn't workout
driver.switchTo().frame("headerPlusFrame");
driver.switchTo().frame("workspaceFrame");
driver.switchTo().frame("workspaceHeaderFrame");
driver.switchTo().frame("workspaceBodyFrame");
driver.findElement(By.linkText("Document List")).click();
could you please help me on this?
<!--<html>
<head>
<frameset id="mainFrameSet" rows="*">
<frame id="headerPlusFrame" scrolling="no" marginwidth="0" marginheight="0" src="../listing/headerPlus.do?lastPage=home" title="Main" name="headerPlusFrame">
<html>
<head>
<body onload="onLoad()">
<table cellspacing="0" cellpadding="0" border="0" bgcolor="#F6F6FB" style="height: 100%; width: 100%">
<tbody>
<tr>
<tr style="height: 100%;">
<td style="padding:2px" colspan="4">
<iframe id="dataFrame" width="100%" height="100%" frameborder="0" marginwidth="0" marginheight="0" src="data.do" title="Data" name="dataFrame">
<html>
<head>
<frameset id="dataFrameSet" rows="*,20">
<frameset id="centerFrameset" cols="*,0">
<frame id="workspaceFrame" frameborder="0" border="0" framespacing="2" title="Workspace" src="workspace.do" name="workspaceFrame">
<html>
<head>
<frameset id="workspaceFrameSet" class="panelFrame" border="0" framespacing="0" frameborder="0" rows="18,*">
<frame id="workspaceHeaderFrame" scrolling="no" noresize="" marginwidth="0" marginheight="0" src="workspaceHeader.do?title=" title="Workspace Header" name="workspaceHeaderFrame">
<frame id="workspaceBodyFrame" noresize="" marginwidth="0" marginheight="0" src="../listing/home.do" title="Workspace Body" name="workspaceBodyFrame">
<html>
<head>
<body onload="onLoad()">
<script language="javascript">
<table width="100%">
<table width="92%" cellspacing="4" cellpadding="4" border="0" align="center">
<tbody>
<tr>
<td width="500px" valign="top">
<table width="400px" cellspacing="2" cellpadding="2" border="0">
<tbody>
<tr>
<tr>
<tr>
<tr>
<td class="homepage">
<img id="doclistImage" border="0" align="left" src="../res/general/folder.gif" alt="Document List">
<a class="homepage" href="javascript:showDocumentList()">Document List</a>
</td>
</tr>
<tr>
<tr>
<tr>
<tr>
</tbody>
</table>
</td>
<td width="500px" valign="top">
</tr>
</tbody>
</table>
</body>
</html>
</frame>
</frameset>
</html>
</frame>
<frame id="rightFrame" frameborder="0" border="0" framespacing="2" title="Encyclopedia" src="../jsp/listing/blank.jsp" name="rightFrame">
</frameset>
<frame id="discussionsFrame" frameborder="0" framespacing="2" border="0" noresize="" src="discussions.do" title="Discussions" name="discussionsFrame">
</frameset>
</html>
</iframe>
</td>
</tr>
</tbody>
</table>
<iframe id="autoNavFrame" src="javascript:parent.empty();" style="width:100%;height:100%;display: none;" title="Main" name="autoNavFrame">
<a id="startLink_iconMenu_menu_btnApplications" onfocus="_CW.MenuWidget_keepFocus('iconMenu_menu_btnApplications');return false;" href="javascript:void(0)" style="position:absolute;left:-30px;top:-30px; visibility:hidden"></a>
<a id="endLink_iconMenu_menu_btnApplications" onfocus="_CW.MenuWidget_keepFocus('iconMenu_menu_btnApplications');return false;" href="javascript:void(0)" style="position:absolute;left:-30px;top:-30px; visibility:hidden"></a>
</body>
</html>
</frame>
</frameset>
</html>-->
I tried the following but it didn't workout
driver.switchTo().frame("headerPlusFrame");
driver.switchTo().frame("workspaceFrame");
driver.switchTo().frame("workspaceHeaderFrame");
driver.switchTo().frame("workspaceBodyFrame");
driver.findElement(By.linkText("Document List")).click();
could you please help me on this?
- How to click a link present inside the frame of a frameset
- unable to find dynamic frame ids
- Unable to click menu with Link attribute
- Select the “back” button of the Firefox browser to right click and Select the Option from the right click Menu in Selenium Web Driver - Java
- Not able to identify frame in Remedy 7.6.04 SRM module using web driver
Permissions in this forum:
You cannot reply to topics in this forum