module SeleniumRecord::Theme

Helpers specific for the bootstrap theme

Public Instance Methods

dropdown_menu_xpath(text) click to toggle source

Returns xpath for the select option that matches the text @param key [String] text of select option

dropdown_xpath(text) click to toggle source

Returns xpath for the dropdown button that matches the text @param key [String] text of dropdown button

find_headline(text) click to toggle source
# File lib/selenium_record/theme.rb, line 8
def find_headline(text)
  xpath = "//div[contains(@class,'headline')]//div[contains(.,'#{text}')]"
  find(:xpath, xpath)
end
modal_header_xpath(key) click to toggle source
section_xpath(text) click to toggle source
# File lib/selenium_record/theme.rb, line 35
def section_xpath(text)
  ".//section//div[@class='panel-header']
   /h3[@class='suspended area-name']/strong/a[contains(.,'#{text}')]"
end
select_option_xpath(id, text) click to toggle source
# File lib/selenium_record/theme.rb, line 19
def select_option_xpath(id, text)
  ".//div[@id='#{id}_chosen']//li[text()='#{text}']"
end
select_xpath(id) click to toggle source

Returns xpath for select decorated with chosen.jquery.js @param [String] id of the select

# File lib/selenium_record/theme.rb, line 15
def select_xpath(id)
  ".//div[@id='#{id}_chosen']/a"
end