Did you try to POST something yourself, by chance?
Nope, the test suite doesn't run well for me at all (my windows is probably too old)
Been there, done that, got the scar. :)
:?) But did you UTSL :?)
https://metacpan.org/pod/WWW::Mechanize::PhantomJS#Functions-that-will-likely-never-be-implemented
Functions that will likely never be implemented ->post I have no use for it ... sub post {
my ($self, $url, %options) = @_; #my $b = $self->tab->{linkedBrowser}; $self->clear_current_form; #my $flags = 0; #if ($options{no_cache}) { # $flags = $self->repl->constant('nsIWebNavigation.LOAD_FLAGS_BYP +ASS_CACHE'); #}; # If we don't have data, encode the parameters: if( !$options{ data }) { my $req= HTTP::Request::Common::POST( $url, $options{params} ) +; #warn $req->content; carp "Faking content from parameters is not yet supported."; #$options{ data } = $req->content; }; #$options{ charset } ||= 'utf-8'; #$options{ headers } ||= {}; #$options{ headers }->{"Content-Type"} ||= "application/x-www-form +-urlencoded"; #if( $options{ charset }) { # $options{ headers }->{"Content-Type"} .= "; charset=$options{ + charset }"; #}; # Javascript POST implementation taken from # http://stackoverflow.com/questions/133925/javascript-post-reques +t-like-a-form-submit $self->eval(<<'JS', $url, $options{ params }, 'POST'); function (path, params, method) { method = method || "post"; // Set method to post by defaul +t if not specified. // The rest of this code assumes you are not using a libra +ry. // It can be made less wordy if you use one. var form = document.createElement("form"); form.setAttribute("method", method); form.setAttribute("action", path); for(var key in params) { if(params.hasOwnProperty(key)) { var hiddenField = document.createElement("input"); hiddenField.setAttribute("type", "hidden"); hiddenField.setAttribute("name", key); hiddenField.setAttribute("value", params[key]); form.appendChild(hiddenField); } } document.body.appendChild(form); form.submit(); } JS
https://metacpan.org/source/CORION/WWW-Mechanize-PhantomJS-0.03/t/50-mech-post.t# Now, how to trick Selenium into fetching the response? }
plan skip_all => "POST requests via Selenium/ghostdriver/PhantomJS + are currently unsupported :-/";
In reply to Re^3: POST in WWW::Mechanize::PhantomJS
by Anonymous Monk
in thread POST in WWW::Mechanize::PhantomJS
by pghilb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |