Skip to content

Commit

Permalink
Merge pull request #41 from hachi8833/fix_typo_selenium_readme
Browse files Browse the repository at this point in the history
[Doc ]Fix typo on selenium/README.md
  • Loading branch information
guilleiguaran authored Jun 11, 2024
2 parents 70a32ed + b405e4e commit ded417e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ require "testcontainers/compose"
Create a new instance of the `Testcontainers::ComposeContainer` class:

``` ruby
compose = Testcontainer::ComposeContainer.new(filepath: Dir.getwd)
```
compose = Testcontainers::ComposeContainer.new(filepath: Dir.getwd)
```

The instance creates a set of containers defined on the .yml file, the 'compose.start' wakes up all containers as service

Expand All @@ -52,7 +52,7 @@ compose.stop

### Connecting to services

Once the service is running, you can obtain the mapped port to connect to it:
Once the service is running, you can obtain the mapped port to connect to it:

```ruby
compose.service_port(service: "hub", port: 4444)
Expand Down Expand Up @@ -85,7 +85,7 @@ You can specify the name of different docker-compose files also:

```ruby
compose_filenames = ["docker-compose.dbs.yml", "docker-compose.web.yml"]
compose = Testcontainer::ComposeContainer.new(filepath: Dir.getwd, compose_filenames: compose_filenames)
compose = Testcontainers::ComposeContainer.new(filepath: Dir.getwd, compose_filenames: compose_filenames)
compose.start
```

Expand Down
10 changes: 5 additions & 5 deletions selenium/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ require "testcontainers/selenium"
Create a new instance of the `Testcontainers::SeleniumContainer` class:

```ruby
container = Testcontainer::SeleniumContainer.new
container = Testcontainers::SeleniumContainer.new
```

This creates a new container with the default Selenium configuration for firefox, the vnc password will be `secret`. You can customise by passing arguments to the constructor:

```ruby
container = Testcontainer::SeleniumContainer.new(capabilities: :chrome, vnc_no_password: true)
container = Testcontainers::SeleniumContainer.new(capabilities: :chrome, vnc_no_password: true)
```

### Starting and Stopping a container
### Starting and Stopping a container

Start the container

Expand All @@ -59,7 +59,7 @@ Stop the container when you're done
container.stop
```

### Connecting to the Selenium container
### Connecting to the Selenium container

Once the container is running, you can obtain the connection details using the following methods:

Expand All @@ -85,7 +85,7 @@ There are complete examples of how to use testcontainers-selenium to create cont
require "testcontainers/selenium"
require "selenium-webdriver"

container = Testcontainer::SeleniumContainer.new
container = Testcontainers::SeleniumContainer.new
container.start

driver = Selenium::WebDriver.for(:firefox, :url => @container.selenium_url)
Expand Down

0 comments on commit ded417e

Please sign in to comment.