module SeleniumRecord::Theme
Helpers specific for the bootstrap theme
Public Instance Methods
dropdown_xpath(text)
click to toggle source
Returns xpath for the dropdown button that matches the text @param key [String] text of dropdown button
# File lib/selenium_record/theme.rb, line 25 def dropdown_xpath(text) ".//button[contains(.,'#{text}')]" end
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
# File lib/selenium_record/theme.rb, line 4 def modal_header_xpath(key) "//div[@class='modal-header']/h3[text()='#{trans(key)}')]" end
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