Skip to content

Commit

Permalink
clean up README
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmcgarvey committed Jan 18, 2023
1 parent 5fe292f commit 89ab22d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -28,6 +28,8 @@ require "selenium"
driver = Selenium::Driver.for(:chrome, base_url: "http://localhost:9515")
```

Creating a driver this way assumes that you have the driver running already.

Available drivers:

- :chrome (using chromedriver)
Expand All @@ -39,7 +41,8 @@ Available drivers:
Rather than running chromedriver yourself, you can give the driver a service which will run the process for you.

```crystal
driver = Selenium::Driver.for(:chrome, service: Service.chrome(driver_path: "~/.webdrivers/chromedriver"))
service = Selenium::Service.chrome(driver_path: File.expand_path("~/.webdrivers/chromedriver", home: true))
driver = Selenium::Driver.for(:chrome, service: service)
```

You must call `driver.stop` when you are finished or it will leave the service running.
Expand Down

0 comments on commit 89ab22d

Please sign in to comment.