Module: Praline

Defined in:
lib/praline.rb

Overview

Author:

  • Antoine d'Otreppe

Instance Method Summary collapse

Instance Method Details

#browserSelenium::WebDriver::Driver

Get the WebDriver itself, for in-depth manipulation

Returns:

  • (Selenium::WebDriver::Driver)

    the driver



76
77
78
# File 'lib/praline.rb', line 76

def browser
    Praline::browser
end

#follow(link_text) ⇒ Object

Follow the specified link

Parameters:

  • link_text (String)

    the text of the link to follow



64
65
66
# File 'lib/praline.rb', line 64

def follow(link_text)
    Praline::browser.find_element(:link, link_text).click
end

#h1String

Get the text of the

of the current page. Will fail if there are several such tags

Returns:

  • (String)

    the text of the single

    tag of the current page



49
50
51
# File 'lib/praline.rb', line 49

def h1
    Praline::browser.find_element(:xpath, "//h1")
end

#input(name, value) ⇒ Object

Fill an input with the given text. Also works with