0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PhantomJS は 302 を success 扱いするが、 301 は fail

0
Posted at

言いたいことはタイトルが全てで、 PhantomJS は 302 リダイレクトを success として扱うが、 301 は fail 扱いする。

なので Poltergeist で 301 のページに visit すると Capybara::Poltergeist::StatusFailError になるが、その時のエラーは

image

みたいな感じで、パッとみた限り何が問題なのか分からないので注意が必要。


PhantomJS のオプションなどでこの振る舞いを変える方法があったら教えて欲しいです :pray: (help には少なくともそれっぽいのは無かった)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?