Frames without iframe tag

122 views
Skip to first unread message

rajee

unread,
May 21, 2014, 7:03:06 AM5/21/14
to seleniu...@googlegroups.com
hi all, 

i am unable to swtich to a frame which has not got iframe tag .....

source code of the page:

<frameset rows="8%,*" cols="*" frameborder="no" border="0" framespacing="0">
  <frame src="super_header.php" name="topFrame" scrolling="auto" id="topFrame" title="topFrame"  />
  <frameset cols="18%,*" frameborder="no" border="0" framespacing="0">
			            <frame src="super_left.php" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" title="Left"  />
            <frame src="super_home.php" name="mainFrame" id="mainFrame" title="mainFrame" />
              </frameset>
</frameset>


 i want to switch to the frame with id leftFrame. But unable to do it. 
driver.switchTo().frame("leftFrame");	 >>>>>>>>> is not working 

Note:iframe tag missing in the source code, due to which selenium doesnt identify any of the frames in the page.

Help plz

Oscar Rieken

unread,
May 21, 2014, 7:12:32 AM5/21/14
to seleniu...@googlegroups.com
What is the actual error?


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/3444da48-d991-42d9-bbae-f8f66d4dc239%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

rajee

unread,
May 21, 2014, 7:16:06 AM5/21/14
to seleniu...@googlegroups.com
 org.openqa.selenium.NoSuchFrameException: Unable to locate frame: leftFrame 

Ashish Juyal

unread,
May 21, 2014, 7:20:29 AM5/21/14
to seleniu...@googlegroups.com
Hi ,
       If your frame is not under any frame then you can use driver.switchTo.defaultContent(); then switch to your frame,if your frame is under other frames you have to create the method to switch under different frames then you can switch to your frame.


Regards
Ashish Juyal


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

 Regards
Ashish Juyal

Oscar Rieken

unread,
May 21, 2014, 7:23:15 AM5/21/14
to seleniu...@googlegroups.com
I think he is right you might need to switch to default content before looking for your frame.


rajee

unread,
May 21, 2014, 7:31:04 AM5/21/14
to seleniu...@googlegroups.com
Perfect guys , it worked out.... Thanks a ton Ashish Juyal and Oscar.Rieken


On Wednesday, 21 May 2014 12:03:06 UTC+1, rajee wrote:

Solomon Adekunle

unread,
May 24, 2014, 9:37:00 PM5/24/14
to seleniu...@googlegroups.com
That's good, but you can also use JavaScript executor.

Panikera Raj

unread,
May 25, 2014, 1:52:30 AM5/25/14
to selenium-users
Hi Solomon,

How can I handle such type of frames using JavaScript executor, Can you provide sample snippet


Regards,
Panikera


On Sun, May 25, 2014 at 7:07 AM, Solomon Adekunle <solomona...@gmail.com> wrote:
That's good, but you can also use JavaScript executor.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages