vendor/gems/gems/firewatir-1.2.1/firewatir.rb
#
# Description:
#   Show all the frames available on the page. Doesn't show nested frames.
#
# Output:
#   Name, and index of all the frames available on the page.
#

Show all the frames available on the page. Doesn't show nested frames.

Name, and index of all the frames available on the page.
Show all the frames available on the page . Doesn ' t show nested frames . Name and index of all the frames available on the page .
def show_frames
            jssh_command = "var frameset = #{WINDOW_VAR}.frames;
                            var elements_frames = new Array();
                            for(var i = 0; i < frameset.length; i++)
                            {
                                var frames = frameset[i].frames;
                                for(var j = 0; j < frames.length; j++)
                                {
                                    elements_frames.push(frames[j].frameElement);    
                                }
                            }
                            elements_frames.length;"
            jssh_command.gsub!("\n", "")
            $jssh_socket.send("#{jssh_command};\n", 0)
            length = read_socket().to_i 
            puts "There are #{length} frames"
            frames = Array.new(length)
            for i in 0..length - 1 do
                frames[i] = Frame.new(self, :jssh_name, "elements_frames[#{i}]")
            end
            for i in 0..length - 1 do
                puts "frame: name: #{frames[i].name}"
                puts "      index: #{i+1}"
            end
        end
def show_frames jssh_command = "var frameset = #{WINDOW_VAR}.frames;
                            var elements_frames = new Array();
                            for(var i = 0; i < frameset.length; i++)
                            {
                                var frames = frameset[i].frames;
                                for(var j = 0; j < frames.length; j++)
                                {
                                    elements_frames.push(frames[j].frameElement);    
                                }
                            }
                            elements_frames.length;" jssh_command . gsub! ( "\n" , "" ) $jssh_socket . send ( "#{jssh_command};\n" , 0 ) length = read_socket ( ) . to_i puts "There are #{length} frames" frames = Array . new ( length ) for i in 0 .. length - 1 do frames [ i ] = Frame . new ( self , :jssh_name , "elements_frames[#{i}]" ) end for i in 0 .. length - 1 do puts "frame: name: #{frames[i].name}" puts "      index: #{i+1}" end end
Description:
Show all the frames available on the page.
Description : Show all the frames available on the page .