Displaying 20 results from an estimated 1000 matches similar to: "Multiple Submit Buttons"
2009 Sep 17
1
Load Error Using Mechanize Gem
Hi,
I''m getting a "Could not open any of [xml2, xslt, exslt] (LoadError)" error when trying to run a simple Ruby program taken from the EXAMPLES.rdoc file of the Mechanize gem.
The error is in this line of the Nokogiri module of libxml.rb: ffi_lib ''xml2'', ''xslt'', ''exslt''
Not sure if there are missing gems, and if so,
2007 Apr 20
2
Running script does not return the correct page
Hello all,
I have tried to post this yesterday, but noticed I was actually not
subscribed yet... Well, here we go again:
If I run this script, and observe the output, the results are not there
at all (try to do the same in the browser). Any suggestions?
require ''rubygems''
require ''mechanize''
agent = WWW::Mechanize.new
agent.user_agent_alias =
2011 Mar 27
2
LinkedIn still not working?
To clarify the issue I posted earlier:
I am on OS X 10.6.7. Trying to use Mechanize to log in to LinkedIn. As others have posted about in the past, when I submit the form it kicks me back to the LinkedIn landing page, and does not log me in.
I read the earlier discussion of the issue that mentioned how cookie values were being improperly dequoted when stored. But I thought that issue was fixed.
2007 Apr 19
1
Do you have any idea what could be the problem with this script?
Hello all,
If I run this script, and observe the output, the results are not there
at all (try to do the same in the browser). Any suggestions?
require ''rubygems''
require ''mechanize''
agent = WWW::Mechanize.new
agent.user_agent_alias = ''Mac Safari''
page =
2007 Jul 12
1
WWW::Mechanize::Link.inspect needs some TLC
The problem: users trying to debug Mechanize apps with Komodo
are finding the debugger times out once it''s loaded a web
page. They don''t run into this in the ruby-debug debugger,
or running in normal mode.
The reason: Komodo''s debugger is graphical, which means that
whenever it hits a breakpoint it automatically shows the
contents of each local variable. It has a
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
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 `%''
2007 Oct 04
2
newbie question with login form
hi,
i''m just starting to work with this incredible tool...
but i got a first problem with the login process
i''m logging on my app like this :
------
@agent = WWW::Mechanize.new { |a| a.log = Logger.new("mech.log") }
@agent.user_agent_alias = ''Mac Safari''
@page = @agent.get("http://myappAdress/")
@form = @page.forms.first
2012 Dec 19
0
(no subject)
hello,
I have a problem, I want to do is get a certificate .p12, I am
implementing the following code:
m= Mechanize.new
m.log = Logger.new "m.log"
m.user_agent_alias = "Mac Safari"
if RbConfig::CONFIG["host_os"] =~ /mingw|mswin/
ca_path = File.expand_path "C:/Users/amdx3/Desktop/cacert.p12"
m.agent.http.ca_file = ca_path
2007 Nov 12
3
Weird error downloading a gzip''ed file
Hi all,
I''ve been using mechanize for a while and it rocks. Docs are pretty clear
and so far I''ve been able to do it on my own.
However, I''m stuck in a weird situation in a script to download my contact
list from hotmail.
I''ve used Firebug to check all urls, and tested it by hand while logged in
via browser.
Even in the script everything works well until the
2009 Apr 09
1
undefined method ''text'' ...
Just trying to run the example
*****
require ''rubygems''
require ''mechanize''
a = WWW::Mechanize.new
a.get(''http://rubyforge.org/'') do |page|
# Click the login link
login_page = a.click(page.links.text(/Log In/))
# Submit the login form
my_page = login_page.form_with(:action => ''/account/login.php'')
2010 Jan 30
0
bug or desired behaviour? couldn’t identify form using string ‘post’ but ‘POST’. html contains ‘post’ though
hi
the code that didn''t work although the page source code says ` <form
class="login" method="post"> `
Please see more info on
http://stackoverflow.com/questions/2165834/bug-or-desired-behaviour-couldnt-identify-form-using-string-post-but-post
Thank you
Radek
`login_form = page.form_with(:method => ''post'')`
and code that works
2010 Oct 20
2
Mechanize::ResponseCodeError: 500
Also, excuse me if my issue is a little bit application-specific. I need
Mechanize to submit bunch of data from our server to an online reservation
system. The url ishttp://hajres.iranair.com/haj/request.php"
It works in my browser however, using mechanize following error appears:
>> agent.get("http://hajres.iranair.com/haj/request.php")
Net::HTTP::Get: /haj/request.php
2006 Dec 07
6
Response To Form Submission Hanging
Hello,
I am using Mechanize to post a form to a website. When I do this by
hand in my browser the response takes about 35s to come back (it''s a
long page full of tables and graphics). When I do this with
Mechanize, the server starts to respond and then appears to hang.
The obvious conclusion is that my code is wrong but I am reasonably
sure that I haven''t altered it
2010 Jun 10
2
submit button param is duplicated when a form is submitted a second time
Hello,
Below I''ve pasted a simple example to reproduce what I say in the
subject. I wonder...
Is it a bug? Is there any workaround?
Thanks!
require ''rubygems''
require ''mechanize''
agent = Mechanize.new
page = agent.get(''http://google.com/'')
google_form = page.form(''f'')
google_form.q = ''ruby
2007 Jan 12
0
why dose to_absolute_uri use URI.escape?
hello.
This code is abort with Mechanize 0.6.4 .
----------------------------
# sample.rb
require "rubygems"
require "mechanize"
agent = WWW::Mechanize.new
agent.user_agent_alias=''Windows Mozilla''
# top page of wikipedia for japanese
agent.get("http://ja.wikipedia.org/wiki/%E3%83%A1%E3%82%A4%E3%83%B3%E3%83%9A%E3%83%BC%E3%82%B8")
2012 May 28
1
rendering a partial inside another using render_to_string and (:formats) in controller
I want to clean my code by moving the duplicated lines :
partial = render_to_string( :partial => "#{file}", :formats =>
[:html] )
to the pagination_partials function.
=================================================
WORKING CODE:
=================================================
def render_format_search_partial(file, options={})
# TODO remove this line to use the one
2007 Aug 12
5
stubbing a method that yeilds sequential results
I''ve just found myself stuck trying to rspec something so am hoping
someone more knowledgable can help.
I have a Connector class which has a class method ''results'' that
yields results it get from a network service based on a set of
attributes that I pass to it. I am wanting to yield these results
from my Intermediate class up to the next
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 Oct 17
6
form submit debugging
version 0.62
I''ve got a form that''s giving me trouble (server reports invalid session
ID). Unfortunately, the form is submitted using SSL so I can''t use a
sniffer to see the differences between the ruby mechanize version and
the perl mechanize version that is working. Is there a way to change the
form action within mechanize? Or a way to display the request headers?