Sha256: f8a3cd0f94d39be6e6615c32aaa40d10ded4a585bb11f2fccc797034188d10ed

Contents?: true

Size: 456 Bytes

Versions: 2

Compression:

Stored size: 456 Bytes

Contents

module ARBookFinder
  class QuickSearchProcessor
    include Capybara::DSL
    
    QUICK_SEARCH_URL = "#{ARBookFinder::BASE_URL}/default.aspx"

    def initialize(query)
      @query = query
    end

    def process
      unless current_url.downcase == QUICK_SEARCH_URL
        visit(QUICK_SEARCH_URL)
      end
      fill_in('ctl00_ContentPlaceHolder1_txtKeyWords', with: @query)
      click_button('ctl00_ContentPlaceHolder1_btnDoIt')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ar_book_finder-1.1.1 lib/ar_book_finder/quick_search_processor.rb
ar_book_finder-1.1.0 lib/ar_book_finder/quick_search_processor.rb