search for: search_form

Displaying 15 results from an estimated 15 matches for "search_form".

2007 Apr 20
2
Running script does not return the correct page
...e in the browser). Any suggestions? require ''rubygems'' require ''mechanize'' agent = WWW::Mechanize.new agent.user_agent_alias = ''Mac Safari'' page = agent.get("http://www.sbstransit.com.sg/iris3/bus_serviceopt.aspx") search_form = page.forms.with.name("Form1").first search_form.txtsvcno = "014" search_form.txtbusstop = ''92129'' search_results = agent.submit(search_form) open(''output.html'',''w'') {|f| f.write search_results.body} Thanks, Pet...
2007 Apr 19
1
Do you have any idea what could be the problem with this script?
...e in the browser). Any suggestions? require ''rubygems'' require ''mechanize'' agent = WWW::Mechanize.new agent.user_agent_alias = ''Mac Safari'' page = agent.get("http://www.sbstransit.com.sg/iris3/bus_serviceopt.aspx") search_form = page.forms.with.name("Form1").first search_form.txtsvcno = "014" search_form.txtbusstop = ''92129'' search_results = agent.submit(search_form) open(''output.html'',''w'') {|f| f.write search_results.body} Thanks, Pet...
2009 Sep 25
0
WWW::Mechanize and Rails console not playing well
I can run this code just fine in irb, but when I run it in rails script/console, I get an error: >> res = agent.submit(search_form, search_form.buttons.first) ArgumentError: one hash required from /home/jwoods/NetBeansProjects/activista/vendor/rails/ actionmailer/lib/../../actionpack/lib/../../activesupport/lib/ active_support/core_ext/string/interpolation.rb:85:in `%'' from /usr/lib/ruby/1.8/webrick/ht...
2009 Jul 29
6
Doubt in nil object with ajax
hi this is my htnl <html> <head> <%= javascript_include_tag :defaults %> </head> <body> <%= form_tag nil, { :id => ''search_form'' } %> <%= text_field ''recipe'', ''name'' %> <%= end_form_tag %> <div id="recipe"> </div> <%= observe_form :search_form, :frequency => 0.5, :update => ''recipe'', :url => { :action...
2008 Jan 15
1
Converting Watir script to Mechanize
...issing'': undefined method `inter_string='' for #<WWW::Mechanize::Form:0x33653c8> (NoMethodError) Here the script I''m testing require ''mechanize'' agent = WWW::Mechanize.new page = agent.get(''http://cpref.gsm.com/inter.asp?r=8084'') search_form = page.forms.with.name("interdrugs").first search_form.inter_string = "Potassium" search_form.submit puts page.body Any help would be greatly appreciated. Luis
2007 May 06
1
How to submit this form?
Hey all, maybe I am missing the obvious again, but I can not submit the form on buy.com: require ''rubygems'' require ''mechanize'' agent = WWW::Mechanize.new agent.user_agent_alias = ''Mac Safari'' page = agent.get("http://www.buy.com") search_form = page.forms.with.name("searchbox").first p search_form.buttons the last array is empty... OK, probably ''GO'' is not a button - but then what it is? How to submit such forms in general (which should be submitted with an image button, which is not really an image button...
2007 Jul 12
1
WWW::Mechanize::Link.inspect needs some TLC
...e: require ''rubygems'' require ''mechanize'' require ''logger'' agent = WWW::Mechanize.new { |a| a.log = Logger.new("mech.log") } agent.user_agent_alias = ''Mac Safari'' page = agent.get("http://www.google.com/") search_form = page.forms.name("f").first search_form.fields.name("q").value = "bratislava tournament" search_results = agent.submit(search_form) puts search_results.body Given this ruby-debug session: bugs $ rdebug mechanize01.rb ./mechanize01.rb:1 require ''rubygems'...
2007 May 20
0
Urgent :: File Object problem
...page!!!" else frame_search = agent.click link check_avai = search_page.body.include? "Server is temporarily unavailable" if check_avai puts "Can''t load Search frame. Server is temporarily unavailable!!!" exit 2 end search_form =frame_search.forms.with.name("searchMemberForm").first #3. Open result file ro prepare to save data File.open(ARGV[1],"w") do |file1| #4. Read zip codes from zipcode text file (each zipcode in 1 line in that file) File.open(ARGV[0],"r") d...
2009 Jan 23
4
getValue() in a Controller problem, help please.
Hello there, I''m trying to do something like: render :update do |page| page[:client_list].replace_html render(:partial => ''client_list'', :object => @clients_list) name = page[:name].getValue(); end but I''m not getting the value, or somehow use $("name").getValue() inside of the controller. How can I do that? tks, David Sousa --
2010 Jan 25
4
Does Amazon.com blocks scraping?
Hi there Does anyone know if Amazon.com has any sort of server side script that tries to block scraping activities? I first noticed that if I didn?t change the agent alias, it would fetch a page exactly like the normal one, but without the intial search field(maybe a silly way to prevent scraping). Then after it, I changed to some other alias, and submit a search. I got the result page as
2006 Apr 03
6
problems with Rails 1.1 observe_field :with serialized
...arams=>{:committee_id=>@committee.id} }, :with => ''Form.serialize("new_contrib_form_#{@account.id.to_s}")'' %> But the problem appears to be that when this is made into Javascript, it wants to do something like parameters:''Form.serialize(''search_form'')=''+value It used to work fine and give me parameters:Form.serialize(''search_form'') I''m pretty sure the same thing happens with observe_form. Ideas? Thanks, Asa -- Posted via http://www.ruby-forum.com/.
2013 Mar 11
0
Position available University of Oxford
...31 March 2017 in the first instance. All applicants must complete an application form and supporting statement. *The closing date for applications is **12.00 noon on 10 April 2013.* For more information and to apply please see https://www.recruit.ox.ac.uk/pls/hrisliverecruit/erq_search_package.search_form?p_company=10&p_internal_external=E The vacancy reference ID is 107127. [[alternative HTML version deleted]]
2006 Nov 04
0
form_remote_tag problems with post url
...----------------------- <%= form_remote_tag(:update => ''search_results'', :url => {:action => :search}, :loading => ''SearchController.disableSearchForm()'', :complete => '' SearchController.enableSearchForm()'', :id => ''search_form'')%> <%= select(:search, :selection, [[''Newest First'', ''new''],[''Most Popular First'',''popular'']]) %> <% select(:search, :time, [[''Today'', ''day''],[''Last Wee...
2007 May 09
4
UI testing framework? (w/o selenium)
...#39;' page.should_include :css, ''default.css'' page.should_have.no_broken_links page.should_have.at_least.3 :div, :class => "bbxBody" page.should_have.at_most.6 :div, :class => "someClassName" # page.[name_of_form]_form. page.search_form.submit :name => "California" do result.status.should_be :success result.should_have :image, "logo.gif" result.url.should_contain "some_page.html" end page.should_have :div, :class => ''something else'' page.should_ha...
2006 Jul 07
4
Help installing Ferret
http://wiki.rubyonrails.com/rails/pages/HowToIntegrateFerretWithRails I followed everything here but at the last I get when loading page get_results Can only handle a String or a Query. RAILS_ROOT: script/../config/.. Application Trace | Framework Trace | Full Trace #{RAILS_ROOT}/app/models/result.rb:27:in `search_each'' #{RAILS_ROOT}/app/models/result.rb:27:in `search_index''