0

I switch frame 'main', switch frame 'midFrame' is working. But switch frame 'left' is not working. Please, take a look at the above script?
Thanks,

use lib: http://webdriver.io/api/protocol/frame.html

<html>
<head></head>
<frameset frameborder="0" border="0" framespacing="0" rows="80,*,20">
    <frameset frameborder="0" border="0" framespacing="0" cols="390,*">...</frameset>
    <frame name='main' src="/CorpWeb/IbsJsps/orbilogin.jsp">
        <html>
            <head></head>
            <frameset rows="18,22,*" cols="*" ...>
                <frame src'...' name='newMidframe'>...</frame>
                <frame src'...' name='midFrame'>...</frame>
                <frameset rows="245,*" cols="*">
                    <frame src='...' name='left'>...</frame>
                    <frame src='...' name='mainFrame'>...</frame>
                </frameset>
            </frameset>
        </html>
    </frame>
    <frame> ... </frame>    
</frameset>
</html>

Error:

{ [RuntimeError: RuntimeError (NoSuchFrame:8) A request to switch to a frame could not be satisfied because the frame could not be found. Problem: no such frame

 Callstack:
 -> frame("mainFrame") ]   message: 'RuntimeError\n     (NoSuchFrame:8) A request to switch to a frame could not be satisfied

because the frame could not be found.\n Problem: no such frame\u001b[1;30m\n\n Callstack:\n -> frame("mainFrame")\n',
name: 'RuntimeError', hasCallStack: true } null { [RuntimeError: RuntimeError (NoSuchFrame:8) A request to switch to a frame could not be satisfied because the frame could not be found. Problem: no such frame

 Callstack:
 -> frame("mainFrame") ]   message: 'RuntimeError\n     (NoSuchFrame:8) A request to switch to a frame could not be satisfied

because the frame could not be found.\n Problem: no such frame\u001b[1;30m\n\n Callstack:\n -> frame("mainFrame")\n',
name: 'RuntimeError', hasCallStack: true }

  • Have you tried to use WAIT period before find that frame? I think it is not getting frame because that LEFT frame taking time to load. – Helping Hands Jan 29 '15 at 05:14

1 Answers1

0

The reason is that

left/mainFrame both are not present under midFrame.

To switch to them please switch back to defaultContent or main frame, and then switch to left/mainFrame. You can see in the html tag, midFrame element ends before next frameset starts.

Vivek Singh
  • 3,641
  • 2
  • 22
  • 27
  • `// Working browser.frame("main",function(err){ browser.frame("midFrame",function(err){ ... }); });` `// Not working browser.frame("main",function(err){ browser.frame("mainFrame",function(err){ ... }); });` – phanstasmal Jan 29 '15 at 07:14