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

Remove dependency on net_http_ssl_fix. Update README. Fixes #59. #60

Merged
merged 2 commits into from
Apr 9, 2019
Merged
Show file tree
Hide file tree
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
36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Run Selenium tests more easily with automatic installation and updates for all supported webdrivers.

# Description
## Description

`webdrivers` downloads drivers and directs Selenium to use them. Currently supports:

Expand All @@ -14,7 +14,7 @@ Run Selenium tests more easily with automatic installation and updates for all s
* [IEDriverServer](https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver)
* [MicrosoftWebDriver](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/)

# Usage
## Usage

In your Gemfile:

Expand All @@ -29,15 +29,15 @@ require 'webdrivers'
The drivers will now be automatically downloaded or updated when you launch a browser
through Selenium.

**Download Location**
### Download Location

The default download location is `~/.webdrivers` directory, and this is configurable:

```ruby
Webdrivers.install_dir = '/webdrivers/install/dir'
```

**Version Pinning**
### Version Pinning

If you would like to use a specific (older or beta) version, you can specify it for each driver. Otherwise, the latest (stable)
driver will be downloaded and passed to Selenium.
Expand All @@ -62,7 +62,7 @@ You can also trigger the update in your code, but it is not required:
Webdrivers::Chromedriver.update
```

# Proxy
### Proxy

If there is a proxy between you and the Internet then you will need to configure
the gem to use the proxy. You can do this by calling the `configure` method.
Expand All @@ -76,27 +76,35 @@ Webdrivers.configure do |config|
end
````

### `SSL_connect` errors

If you are getting an error like this (especially common on Windows):

`SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed`

Add the following to your Gemfile:

```ruby
gem "net_http_ssl_fix"
```

Add the following to your code:

````ruby
Webdrivers.net_http_ssl_fix
require 'net_http_ssl_fix'
````

# Logging
### Logging

The logging level can be configured for debugging purpose:

```ruby
Webdrivers.logger.level = :DEBUG
```

# Browser Specific Notes
### Browser Specific Notes

**When using Chrome/Chromium**
#### When using Chrome/Chromium

The version of `chromedriver` will depend on the version of Chrome you are using it with:

Expand All @@ -112,7 +120,7 @@ Selenium::WebDriver::Chrome.path = '/chromium/install/path/to/binary'

This is also required if Google Chrome is not installed in its [default location](https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver).

**When using Microsoft Edge**
#### When using Microsoft Edge

After updating Microsoft Edge on Windows 10, you will need to delete the existing binary (`%USERPROFILE%/.webdrivers/MicrosoftWebDriver.exe`) to
to be able to download the latest version through this gem.
Expand All @@ -124,21 +132,19 @@ expected version and skips the download process.

If you continue with the outdated binary, Selenium will throw an error: `unable to connect to MicrosoftWebDriver localhost:17556`.

# Wiki
## Wiki

Please see the [wiki](https://github.com/titusfortner/webdrivers/wiki) for solutions to commonly reported issues.

# License
## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT),
see LICENSE.txt for full details and copyright.


# Contributing
## Contributing

Bug reports and pull requests are welcome [on GitHub](https://github.com/titusfortner/webdrivers). Run `bundle exec rake` and squash the commits in your PRs.


## Copyright

Copyright (c) 2017 Titus Fortner
Expand Down
4 changes: 0 additions & 4 deletions lib/webdrivers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,5 @@ def logger
def configure
yield self
end

def net_http_ssl_fix
require 'net_http_ssl_fix'
end
end
end
4 changes: 2 additions & 2 deletions lib/webdrivers/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ def site_available?
get(base_url)
Webdrivers.logger.debug "Found Site: #{base_url}"
true
rescue StandardError => ex
Webdrivers.logger.debug ex.inspect
rescue StandardError => e
Webdrivers.logger.debug e
false
end

Expand Down
1 change: 0 additions & 1 deletion webdrivers.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rubocop-rspec', '~>1.32'
s.add_development_dependency 'simplecov', '~>0.16'

s.add_runtime_dependency 'net_http_ssl_fix'
s.add_runtime_dependency 'nokogiri', '~> 1.6'
s.add_runtime_dependency 'rubyzip', '~> 1.0'
s.add_runtime_dependency 'selenium-webdriver', '~> 3.0'
Expand Down