Skip to content
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
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,23 @@ docker run -it --rm -v ~/lets-qa/acceptance:/app test-runner:amd64 bash
This command launches the container with the current working directory set
to `/app`, where your tests are mounted. From there you can run any
commands you need, such as `bundle exec cucumber` or `bundle exec rspec`.

## Testing Watir

You can quickly verify that Watir is working inside the container by running a small script.

```ruby
# test_browser.rb
require 'watir'
browser = Watir::Browser.new(:chrome, headless: true)
browser.goto('https://example.com')
puts browser.title
browser.close
```

Run the script inside the container with:

```bash
bundle exec ruby test_browser.rb
```

6 changes: 6 additions & 0 deletions test_browser.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
require 'watir'

browser = Watir::Browser.new(:chrome, headless: true)
browser.goto('https://example.com')
puts browser.title
browser.close
Loading