Report abuse

def get_prices_all_funds()
    # Get a list of all the symbols (and their prices) in all the funds at FOLIOfn.
    symbol_data = Scrubyt::Extractor.define do
        fetch 'https://www.website.com'
        fill_textfield 'loginID', 'login'
        fill_textfield 'password', 'password'
        submit
        click_link 'Model Funds'
        click_link 'Model Fund #1'
        click_link 'View Holdings'
        select_option('query.key','key')
        submit('view_portal','GO')
        symbols_table "//table[@width='100%']" do
            symbol_row "//tr" do

                symbol "//td[1]" do
                end.ensure_absence_of_attribute('class' => 'ftTxt10')

                shares "//td[3]" do
                end.ensure_absence_of_attribute('class' => 'ftTxt10')

                price "//td[4]" do
                end.ensure_absence_of_attribute('class' => 'ftTxt10')

                total_value "//td[5]" do
                end.ensure_absence_of_attribute('class' => 'ftTxt10')

            end.ensure_presence_of_pattern('price').select_indices(:all_but_last)
        end
    end
    return symbol_data
end