Class: Puppeteer::Frame

Inherits:
Object
  • Object
show all
Defined in:
lib/isomorfeus/puppeteer/frame.rb

Instance Method Summary collapse

Instance Method Details

#_original_gotoObject



20
# File 'lib/isomorfeus/puppeteer/frame.rb', line 20

alias_method :_original_goto, :goto

#await_ruby(ruby_source = '', file = nil, line = nil, &block) ⇒ Object



14
15
16
# File 'lib/isomorfeus/puppeteer/frame.rb', line 14

def await_ruby(ruby_source = '', file = nil, line = nil, &block)
  @main_world.await_ruby(ruby_source, file, line, &block)
end

#eval_ruby(ruby_source = '', file = nil, line = nil, &block) ⇒ Object



6
7
8
# File 'lib/isomorfeus/puppeteer/frame.rb', line 6

def eval_ruby(ruby_source = '', file = nil, line = nil, &block)
  @main_world.eval_ruby(ruby_source, file, line, &block)
end

#eval_with_opal(ruby_source = '', file = nil, line = nil, &block) ⇒ Object



10
11
12
# File 'lib/isomorfeus/puppeteer/frame.rb', line 10

def eval_with_opal(ruby_source = '', file = nil, line = nil, &block)
  @main_world.eval_with_opal(ruby_source, file, line, &block)
end

#goto(uri, referer: nil, timeout: nil, wait_until: nil) ⇒ Object Also known as: visit



22
23
24
25
26
27
28
29
30
31
# File 'lib/isomorfeus/puppeteer/frame.rb', line 22

def goto(uri, referer: nil, timeout: nil, wait_until: nil)
  parsed_uri = URI.parse(uri)
  app = Isomorfeus::Puppetmaster.served_app
  unless parsed_uri.host && parsed_uri.scheme
    parsed_uri.host = app.host
    parsed_uri.port = app.port
    parsed_uri.scheme = app.scheme
  end
  _original_goto(parsed_uri.to_s, referer: referer, timeout: timeout, wait_until: wait_until)
end

#Sx1(x) ⇒ Object



2
3
4
# File 'lib/isomorfeus/puppeteer/frame.rb', line 2

def Sx1(x)
  self.Sx(x).first
end