diff --git a/README.md b/README.md index 963a815..5404f22 100644 --- a/README.md +++ b/README.md @@ -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 +``` + diff --git a/test_browser.rb b/test_browser.rb new file mode 100644 index 0000000..46418e5 --- /dev/null +++ b/test_browser.rb @@ -0,0 +1,6 @@ +require 'watir' + +browser = Watir::Browser.new(:chrome, headless: true) +browser.goto('https://example.com') +puts browser.title +browser.close