Skip to content

Commit 32ae0d0

Browse files
committed
pending
1 parent fbc89b5 commit 32ae0d0

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
layout: single
3+
title: Migrating Your Capybara Driver from PhantomJS to Headless ChromeDriver
4+
tags: [dev]
5+
status: publish
6+
date: 2017-08-22 9:25:10 +0800
7+
type: post
8+
category: articles
9+
published: true
10+
---
11+
12+
Newsflash: [Vitaly Slobodin, the PhantomJS maintainer, is stepping down](https://groups.google.com/forum/#!topic/phantomjs/9aI5d-LDuNE),
13+
since [Google Chrome version 59 will ship with its own headless option](https://news.ycombinator.com/item?id=14101233).
14+
This means you're going to have to move all your capybara tests from PhantomJS into ChromeDriver.
15+
16+
If you're coming from [poltergeist](https://github.com/teampoltergeist/poltergeist),
17+
which runs PhantomJS, you'lll have to install [selenium-webdriver](https://github.com/seleniumhq/selenium),
18+
19+
{% highlight bash %}
20+
#!/bin/sh
21+
count=0
22+
while ./runtest; do
23+
((count++));
24+
echo "Retry Count: $count"
25+
done
26+
{% endhighlight %}
27+
28+
{% highlight bash %}
29+
{% endhighlight %}
30+
31+
For more `chromeOptions`: check the [headless chrome documentation](https://developers.google.com/web/updates/2017/04/headless-chrome#cli).
32+
`disable-gpu` is temporarily required to run headless, but it may not be necessary in the future.

0 commit comments

Comments
 (0)