Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add headless info #186

Open
wants to merge 1 commit into
base: source
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions _guides/firefox.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ version available to have the most complete feature set.
b = Watir::Browser.new :firefox
{% endhighlight %}

### Headless

Firefox has a headless feature that can be accessed directly with:

{% highlight ruby %}
b = Watir::Browser.new :firefox, headless: true
{% endhighlight %}

However this syntax is deprecated by Selenium so the following syntax should be prefered.

{% highlight ruby %}
b = Watir::Browser.new :firefox, options: {args: ['-headless']}
{% endhighlight %}

It also possible to use [the Headless gem](/guides/headless/).

### Firefox Options
All options are explained on the [geckodriver page](https://github.com/mozilla/geckodriver#webdriver-capabilities)

Expand Down