File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,3 +40,23 @@ docker run -it --rm -v ~/lets-qa/acceptance:/app test-runner:amd64 bash
4040This command launches the container with the current working directory set
4141to ` /app ` , where your tests are mounted. From there you can run any
4242commands you need, such as ` bundle exec cucumber ` or ` bundle exec rspec ` .
43+
44+ ## Testing Watir
45+
46+ You can quickly verify that Watir is working inside the container by running a small script.
47+
48+ ``` ruby
49+ # test_browser.rb
50+ require ' watir'
51+ browser = Watir ::Browser .new (:chrome , headless: true )
52+ browser.goto(' https://example.com' )
53+ puts browser.title
54+ browser.close
55+ ```
56+
57+ Run the script inside the container with:
58+
59+ ``` bash
60+ bundle exec ruby test_browser.rb
61+ ```
62+
Original file line number Diff line number Diff line change 1+ require 'watir'
2+
3+ browser = Watir ::Browser . new ( :chrome , headless : true )
4+ browser . goto ( 'https://example.com' )
5+ puts browser . title
6+ browser . close
You can’t perform that action at this time.
0 commit comments