howitzer 2.0.3 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +69 -11
- data/LICENSE +1 -1
- data/README.md +21 -17
- data/bin/howitzer +7 -6
- data/generators/base_generator.rb +31 -17
- data/generators/config/config_generator.rb +11 -3
- data/generators/config/templates/boot.rb +3 -3
- data/generators/config/templates/capybara.rb +6 -131
- data/generators/config/templates/default.yml +34 -13
- data/generators/config/templates/drivers/appium.rb +25 -0
- data/generators/config/templates/drivers/browserstack.rb +23 -0
- data/generators/config/templates/drivers/crossbrowsertesting.rb +29 -0
- data/generators/config/templates/drivers/headless_chrome.rb +15 -0
- data/generators/config/templates/drivers/headless_firefox.rb +23 -0
- data/generators/config/templates/drivers/sauce.rb +25 -0
- data/generators/config/templates/drivers/selenium.rb +24 -0
- data/generators/config/templates/drivers/selenium_grid.rb +31 -0
- data/generators/config/templates/drivers/testingbot.rb +24 -0
- data/generators/cucumber/cucumber_generator.rb +2 -2
- data/generators/cucumber/templates/common_steps.rb +3 -3
- data/generators/cucumber/templates/cucumber.rake +5 -13
- data/generators/cucumber/templates/cuke_sniffer.rake +2 -2
- data/generators/cucumber/templates/env.rb +9 -1
- data/generators/cucumber/templates/hooks.rb +8 -2
- data/generators/cucumber/templates/transformers.rb +11 -25
- data/generators/emails/emails_generator.rb +2 -2
- data/generators/emails/templates/example_email.rb +1 -1
- data/generators/prerequisites/prerequisites_generator.rb +3 -3
- data/generators/prerequisites/templates/base.rb +1 -1
- data/generators/prerequisites/templates/{factory_girl.rb → factory_bot.rb} +7 -6
- data/generators/prerequisites/templates/users.rb +1 -1
- data/generators/root/root_generator.rb +3 -3
- data/generators/root/templates/Gemfile.erb +16 -22
- data/generators/rspec/rspec_generator.rb +2 -2
- data/generators/rspec/templates/rspec.rake +8 -8
- data/generators/rspec/templates/spec_helper.rb +6 -5
- data/generators/tasks/tasks_generator.rb +2 -2
- data/generators/turnip/templates/spec_helper.rb +6 -5
- data/generators/turnip/turnip_generator.rb +2 -2
- data/generators/web/templates/example_page.rb +1 -1
- data/generators/web/web_generator.rb +2 -2
- data/lib/howitzer/cache.rb +20 -19
- data/lib/howitzer/capybara_helpers.rb +58 -13
- data/lib/howitzer/email.rb +3 -2
- data/lib/howitzer/exceptions.rb +21 -20
- data/lib/howitzer/gmail_api/client.rb +31 -0
- data/lib/howitzer/gmail_api.rb +7 -0
- data/lib/howitzer/log.rb +6 -6
- data/lib/howitzer/mail_adapters/gmail.rb +96 -0
- data/lib/howitzer/mail_adapters/mailgun.rb +4 -2
- data/lib/howitzer/mail_adapters/mailtrap.rb +108 -0
- data/lib/howitzer/mailgun_api/client.rb +3 -2
- data/lib/howitzer/mailgun_api/connector.rb +1 -0
- data/lib/howitzer/mailgun_api/response.rb +1 -2
- data/lib/howitzer/mailtrap_api/client.rb +52 -0
- data/lib/howitzer/mailtrap_api.rb +7 -0
- data/lib/howitzer/meta/actions.rb +35 -0
- data/lib/howitzer/meta/element.rb +40 -0
- data/lib/howitzer/meta/entry.rb +62 -0
- data/lib/howitzer/meta/iframe.rb +41 -0
- data/lib/howitzer/meta/section.rb +30 -0
- data/lib/howitzer/meta.rb +11 -0
- data/lib/howitzer/utils/string_extensions.rb +6 -2
- data/lib/howitzer/version.rb +1 -1
- data/lib/howitzer/web/base_section.rb +1 -1
- data/lib/howitzer/web/capybara_context_holder.rb +1 -0
- data/lib/howitzer/web/capybara_methods_proxy.rb +15 -6
- data/lib/howitzer/web/element_dsl.rb +104 -44
- data/lib/howitzer/web/iframe_dsl.rb +23 -3
- data/lib/howitzer/web/page.rb +16 -4
- data/lib/howitzer/web/page_dsl.rb +19 -7
- data/lib/howitzer/web/page_validator.rb +27 -26
- data/lib/howitzer/web/section.rb +13 -2
- data/lib/howitzer/web/section_dsl.rb +65 -30
- data/lib/howitzer.rb +66 -10
- metadata +67 -133
- data/.coveralls.yml +0 -1
- data/.gitignore +0 -14
- data/.rspec +0 -3
- data/.rubocop.yml +0 -44
- data/.ruby-gemset +0 -1
- data/.travis.yml +0 -7
- data/Gemfile +0 -13
- data/MAINTENANCE.md +0 -32
- data/Rakefile +0 -22
- data/features/cli_help.feature +0 -31
- data/features/cli_new.feature +0 -349
- data/features/cli_unknown.feature +0 -17
- data/features/cli_update.feature +0 -178
- data/features/cli_version.feature +0 -14
- data/features/step_definitions/common_steps.rb +0 -29
- data/features/support/env.rb +0 -1
- data/features/support/transformers.rb +0 -3
- data/generators/root/templates/.gitignore +0 -21
- data/generators/root/templates/.rubocop.yml +0 -35
- data/generators/turnip/templates/.rspec +0 -1
- data/howitzer.gemspec +0 -37
- data/lib/howitzer/mail_adapters/debugmail.rb +0 -0
- data/spec/config/custom.yml +0 -9
- data/spec/spec_helper.rb +0 -72
- data/spec/support/generator_helper.rb +0 -21
- data/spec/support/logger_helper.rb +0 -13
- data/spec/support/mailgun_unit_client.rb +0 -68
- data/spec/support/shared_examples/capybara_context_holder.rb +0 -33
- data/spec/support/shared_examples/capybara_methods_proxy.rb +0 -94
- data/spec/support/shared_examples/dynamic_section_methods.rb +0 -35
- data/spec/support/shared_examples/element_dsl.rb +0 -242
- data/spec/unit/generators/base_generator_spec.rb +0 -272
- data/spec/unit/generators/config_generator_spec.rb +0 -38
- data/spec/unit/generators/cucumber_generator_spec.rb +0 -62
- data/spec/unit/generators/emails_generator_spec.rb +0 -35
- data/spec/unit/generators/prerequisites_generator_spec.rb +0 -53
- data/spec/unit/generators/root_generator_spec.rb +0 -72
- data/spec/unit/generators/rspec_generator_spec.rb +0 -36
- data/spec/unit/generators/tasks_generator_spec.rb +0 -31
- data/spec/unit/generators/turnip_generator_spec.rb +0 -52
- data/spec/unit/generators/web_generator_spec.rb +0 -52
- data/spec/unit/lib/cache_spec.rb +0 -85
- data/spec/unit/lib/capybara_helpers_spec.rb +0 -696
- data/spec/unit/lib/email_spec.rb +0 -186
- data/spec/unit/lib/howitzer_spec.rb +0 -40
- data/spec/unit/lib/init_spec.rb +0 -2
- data/spec/unit/lib/log_spec.rb +0 -122
- data/spec/unit/lib/mail_adapters/abstract_spec.rb +0 -62
- data/spec/unit/lib/mail_adapters/mailgun_spec.rb +0 -163
- data/spec/unit/lib/mailgun_api/client_spec.rb +0 -58
- data/spec/unit/lib/mailgun_api/connector_spec.rb +0 -54
- data/spec/unit/lib/mailgun_api/response_spec.rb +0 -28
- data/spec/unit/lib/utils/string_extensions_spec.rb +0 -77
- data/spec/unit/lib/web/base_section_spec.rb +0 -43
- data/spec/unit/lib/web/element_dsl_spec.rb +0 -22
- data/spec/unit/lib/web/iframe_dsl_spec.rb +0 -144
- data/spec/unit/lib/web/page_dsl_spec.rb +0 -74
- data/spec/unit/lib/web/page_spec.rb +0 -349
- data/spec/unit/lib/web/page_validator_spec.rb +0 -276
- data/spec/unit/lib/web/section_dsl_spec.rb +0 -165
- data/spec/unit/lib/web/section_spec.rb +0 -63
- data/spec/unit/version_spec.rb +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 1c577b57b08ceb6da2f3a82b8b7e29950f02903fd519379bf42d49bfbb98d619
|
|
4
|
+
data.tar.gz: 3c3ee954802caa64bddd20e53c230dae5a6442bd83860b85058f90a61bf8cbc3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1bbe3fe208d2d92ebfa7b04e6ae7fa7842ff8400515f8e699ab8587cbdb1ee8206f2cfc0a9e7b3841173fd6c4f7d0ab01341dc24172ca0a3fb4136c07a14ca46
|
|
7
|
+
data.tar.gz: 3f98ca3bc90bd1e35b7b2a87bbc8059878de7bbe08109cbdeff83e46f02bf9a8503f3bc4d034028fbef73718aac71702424276a49d59f892e25bf771d21e8f4d
|
data/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,66 @@
|
|
|
1
|
-
## [In git](https://github.com/strongqa/howitzer/compare/v2.0
|
|
1
|
+
## [In git](https://github.com/strongqa/howitzer/compare/v2.3.0...master)
|
|
2
2
|
|
|
3
3
|
### New Features
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Bug-fixes
|
|
6
|
+
|
|
7
|
+
## [v2.3.0](https://github.com/strongqa/howitzer/compare/v2.2.0...v2.3.0)
|
|
8
|
+
|
|
9
|
+
### New Features
|
|
10
|
+
- Support Ruby 3.0 (minimum version is 2.6.8)
|
|
11
|
+
- Unlock Activesupport 6.x
|
|
12
|
+
- Support latest versions of Cucumber
|
|
13
|
+
- Integrate rubocop-rspec linter
|
|
14
|
+
- Use latest version Rubocop
|
|
15
|
+
- Stop capybara-webkit support
|
|
16
|
+
- Stop poltergeist support
|
|
17
|
+
- Stop Apium driver support
|
|
18
|
+
- remove gmail gem from dependencies and add it only when it is really required
|
|
19
|
+
- Migrate to new Travis CI domain
|
|
20
|
+
- Replace abandoned Coveralls integration with Codecov [codecov.io](https://codecov.io/gh/strongqa/howitzer/)
|
|
21
|
+
|
|
22
|
+
## [v2.2.0](https://github.com/strongqa/howitzer/compare/v2.1.1...v2.2.0)
|
|
23
|
+
|
|
24
|
+
### New Features
|
|
25
|
+
- [#293](https://github.com/strongqa/howitzer/issues/293) add support ordering for run tests
|
|
26
|
+
- [#276](https://github.com/strongqa/howitzer/issues/276) Add support Capybara v3
|
|
27
|
+
- [#280](https://github.com/strongqa/howitzer/issues/280) Add support Firefox Headless
|
|
28
|
+
- [#241](https://github.com/strongqa/howitzer/issues/241) meta interface added. Allows tracking elements,sections, iframes on the page.
|
|
29
|
+
- [#266](https://github.com/strongqa/howitzer/issues/266) ruby 2.2 no longer supported
|
|
30
|
+
- [#265](https://github.com/strongqa/howitzer/issues/265) Add Appium driver
|
|
31
|
+
### Bug-fixes
|
|
32
|
+
- [#286](https://github.com/strongqa/howitzer/issues/286) [Installation] generated rubocop.yml doesn't cover ruby sources
|
|
33
|
+
- [#274](https://github.com/strongqa/howitzer/issues/274) Stopped PhantomJS supporting
|
|
34
|
+
- [#282](https://github.com/strongqa/howitzer/issues/282) Multiple sessions don't work properly
|
|
35
|
+
|
|
36
|
+
## [v2.1.1](https://github.com/strongqa/howitzer/compare/v2.1.0...v2.1.1)
|
|
37
|
+
|
|
38
|
+
### New Features
|
|
39
|
+
- Cucumber rake tasks minor updates
|
|
40
|
+
- [#257](https://github.com/strongqa/howitzer/issues/257) Simplify working with multiple domains
|
|
41
|
+
|
|
42
|
+
### Bug-fixes
|
|
43
|
+
- [#225](https://github.com/strongqa/howitzer/issues/225) Frames under namespace support
|
|
44
|
+
- [#254](https://github.com/strongqa/howitzer/issues/254) Screenshot driver now created for the active driver
|
|
45
|
+
- [#252](https://github.com/strongqa/howitzer/issues/252) Wrong location of log files fixed
|
|
46
|
+
- [#248](https://github.com/strongqa/howitzer/issues/248) FactoryGirl renamed to FactoryBot in cucumber transformation.
|
|
47
|
+
- [#246](https://github.com/strongqa/howitzer/issues/246) Options fixed for rspec rake tasks
|
|
48
|
+
|
|
49
|
+
## [v2.1.0](https://github.com/strongqa/howitzer/compare/v2.0.3...v2.1.0)
|
|
50
|
+
|
|
51
|
+
### New Features
|
|
52
|
+
- Integrate CrossBrowserTesting
|
|
53
|
+
- Add Mailtrap support
|
|
54
|
+
- Add Gmail support
|
|
55
|
+
- Add Colorized output
|
|
56
|
+
- Add new option **user_agent** to allow custom user agent setup
|
|
57
|
+
- **mailgun_sleep_time** deprecated, **mail_sleep_time** used instead for all mail adapters
|
|
58
|
+
- Split Capybara drivers configuration to separate files
|
|
59
|
+
- Migrate FactoryGirl to FactoryBot
|
|
60
|
+
- Support Cucumber 3
|
|
61
|
+
|
|
62
|
+
### Bug-fixes
|
|
63
|
+
- [#231](https://github.com/strongqa/howitzer/issues/231) **window_maximized** option fixed for chrome browser on MacOS
|
|
6
64
|
|
|
7
65
|
## [v2.0.3](https://github.com/strongqa/howitzer/compare/v2.0.2...v2.0.3)
|
|
8
66
|
|
|
@@ -11,7 +69,7 @@
|
|
|
11
69
|
- Stop supported **mailgun_idle_timeout** deprecated setting
|
|
12
70
|
- Added maintenance instructions for releasing
|
|
13
71
|
|
|
14
|
-
###
|
|
72
|
+
### Bug-fixes
|
|
15
73
|
- [#222](https://github.com/strongqa/howitzer/issues/222) fix issue with incorrect iframe scope identifying
|
|
16
74
|
|
|
17
75
|
## [v2.0.2](https://github.com/strongqa/howitzer/compare/v2.0.1...v2.0.2)
|
|
@@ -26,7 +84,7 @@
|
|
|
26
84
|
- Add element_presence argument validation
|
|
27
85
|
- Review and improve tests quality
|
|
28
86
|
|
|
29
|
-
###
|
|
87
|
+
### Bug-fixes
|
|
30
88
|
- Fix element capybara options merging
|
|
31
89
|
- [#211](https://github.com/strongqa/howitzer/issues/211) Validation for iframe does not operate as intended
|
|
32
90
|
- [#210](https://github.com/strongqa/howitzer/issues/210) Options like "wait" can not be used with iframe methods
|
|
@@ -42,7 +100,7 @@
|
|
|
42
100
|
- Implement wait_for_xxx_element method for sync
|
|
43
101
|
- Implement within_xxx_element method like Capybara.within
|
|
44
102
|
|
|
45
|
-
###
|
|
103
|
+
### Bug-fixes
|
|
46
104
|
- [#188](https://github.com/strongqa/howitzer/issues/188) Page validation by element presence does not work properly
|
|
47
105
|
- [#191](https://github.com/strongqa/howitzer/issues/191) Generated project is broken
|
|
48
106
|
- [#195](https://github.com/strongqa/howitzer/issues/195) Incorrect parameters passing in lambda locators
|
|
@@ -54,7 +112,7 @@
|
|
|
54
112
|
## [v2.0.0](https://github.com/strongqa/howitzer/compare/v1.1.1...v2.0.0)
|
|
55
113
|
|
|
56
114
|
### New Features
|
|
57
|
-
- Added REST API prerequisites with
|
|
115
|
+
- Added REST API prerequisites with FactoryBot
|
|
58
116
|
- Added Turnip supporting
|
|
59
117
|
- Restricted using several bdd frameworks at the same time
|
|
60
118
|
- Removed Opera browser supporting
|
|
@@ -80,7 +138,7 @@
|
|
|
80
138
|
|
|
81
139
|
## [v1.1.1](https://github.com/strongqa/howitzer/compare/v1.1.0...v1.1.1)
|
|
82
140
|
|
|
83
|
-
###
|
|
141
|
+
### Bug-fixes
|
|
84
142
|
- fixed problem with Mailgun
|
|
85
143
|
- fixed problems with gems
|
|
86
144
|
|
|
@@ -103,7 +161,7 @@
|
|
|
103
161
|
- Integrated YardDoc
|
|
104
162
|
- Integrated Gitter
|
|
105
163
|
|
|
106
|
-
###
|
|
164
|
+
### Bug-fixes
|
|
107
165
|
- Fixed issue with loading ActiveSupport
|
|
108
166
|
|
|
109
167
|
## [v1.0.2](https://github.com/strongqa/howitzer/compare/v1.0.1...v1.0.2)
|
|
@@ -121,14 +179,14 @@
|
|
|
121
179
|
- Rewritten command line interface and covered by acceptance tests fully
|
|
122
180
|
- Simplified DataStorage clearing after each tests
|
|
123
181
|
|
|
124
|
-
###
|
|
182
|
+
### Bug-fixes
|
|
125
183
|
- Fixed reset session after each scenario against to IE
|
|
126
184
|
- Corrected default Cucumber and Rspec formatters
|
|
127
185
|
- Minor bug fixing and code refactoring
|
|
128
186
|
|
|
129
187
|
## [v1.0.1](https://github.com/strongqa/howitzer/compare/v1.0...v1.0.1)
|
|
130
188
|
|
|
131
|
-
###
|
|
189
|
+
### Bug-fixes
|
|
132
190
|
- Fixed unit tests
|
|
133
191
|
- Fixed correct Ruby version supporting
|
|
134
192
|
|
|
@@ -145,7 +203,7 @@ It is major release, so there are many new features, refactoring, unit tests, co
|
|
|
145
203
|
|
|
146
204
|
* Added supporting poltergeist driver
|
|
147
205
|
|
|
148
|
-
###
|
|
206
|
+
### Bug-fixes
|
|
149
207
|
|
|
150
208
|
* Fixed problem with dependencies
|
|
151
209
|
|
data/LICENSE
CHANGED
data/README.md
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
<p align="center" style="overflow: hidden;">
|
|
2
|
-
<a href="
|
|
2
|
+
<a href="https://howitzer-framework.io">
|
|
3
3
|
<img src="https://raw.githubusercontent.com/strongqa/howitzer/gh-pages/images/howitzer-logo.png" alt="Howitzer" />
|
|
4
4
|
</a>
|
|
5
5
|
<br/>
|
|
6
6
|
|
|
7
|
-
<p align="center"><b>Ruby-based framework for acceptance testing of web applications.</b></p>
|
|
7
|
+
<p align="center"><b>A Ruby-based framework for acceptance testing of web applications.</b></p>
|
|
8
8
|
|
|
9
9
|
<p align="center">The framework was built with modern patterns, techniques, and tools in automated testing in order to speed up tests development and simplify supporting.</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<a href="https://gitter.im/strongqa/howitzer"><img src="https://badges.gitter.im/Join%20Chat.svg" /></a>
|
|
13
|
-
<a href="https://rubygems.org/gems/howitzer"><img src="
|
|
14
|
-
<a href="https://travis-ci.
|
|
15
|
-
<a href='https://gemnasium.com/strongqa/howitzer'><img src="https://gemnasium.com/strongqa/howitzer.svg" /></a>
|
|
13
|
+
<a href="https://rubygems.org/gems/howitzer"><img src="https://img.shields.io/gem/v/howitzer.svg" /></a>
|
|
14
|
+
<a href="https://app.travis-ci.com/github/strongqa/howitzer"><img src="https://app.travis-ci.com/strongqa/howitzer.svg?branch=master" /></a>
|
|
16
15
|
<a href="https://codeclimate.com/github/strongqa/howitzer"><img src="https://codeclimate.com/github/strongqa/howitzer.png" /></a>
|
|
17
|
-
<a href=
|
|
18
|
-
|
|
16
|
+
<a href="https://codecov.io/gh/strongqa/howitzer">
|
|
17
|
+
<img src="https://codecov.io/gh/strongqa/howitzer/branch/master/graph/badge.svg?token=vB8DYQtmjA"/>
|
|
18
|
+
</a>
|
|
19
|
+
<a href="https://github.com/strongqa/howitzer/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" /></a>
|
|
19
20
|
</p>
|
|
20
21
|
|
|
21
22
|
</p>
|
|
@@ -25,12 +26,13 @@
|
|
|
25
26
|
- Fast installation and configuration of the complete testing infrastructure (takes less than 5 minutes).
|
|
26
27
|
- Elegant, intuitive and powerful Ruby language underneath.
|
|
27
28
|
- Possibility to choose your favorite BDD tool (Cucumber, RSpec or Turnip).
|
|
28
|
-
- Integration with SauceLabs, Testingbot, BrowserStack
|
|
29
|
+
- Integration with SauceLabs, Testingbot, BrowserStack, CrossBrowserTesting cloud services.
|
|
30
|
+
- Integration with MailGun, Gmail, Mailtrap email services.
|
|
29
31
|
- Easy tests support based on the best patterns, techniques, principles.
|
|
30
32
|
- Ability to execute tests against to both browserless driver and actual browsers with no changes in your tests.
|
|
31
33
|
|
|
32
34
|
## Documentation
|
|
33
|
-
Refer to the [GETTING STARTED](
|
|
35
|
+
Refer to the [GETTING STARTED](https://docs.howitzer-framework.io) document to start working with *Howitzer*.
|
|
34
36
|
|
|
35
37
|
You can also find the Rdoc documentation on [Rubygems](https://rubygems.org/gems/howitzer).
|
|
36
38
|
|
|
@@ -41,14 +43,14 @@ You can also find the Rdoc documentation on [Rubygems](https://rubygems.org/gems
|
|
|
41
43
|
|
|
42
44
|
## Requirements
|
|
43
45
|
* Supported OS: Mac OS X, Linux, Windows
|
|
44
|
-
* [Ruby](https://www.ruby-lang.org/en/downloads/) 2.
|
|
46
|
+
* [Ruby](https://www.ruby-lang.org/en/downloads/) 2.6.8+
|
|
45
47
|
* [DevKit](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit#installation-instructions) (For **Windows** only)
|
|
46
|
-
* [PhantomJS](http://phantomjs.org/download.html) (For **phantomjs** and **poltergeist** drivers only)
|
|
47
48
|
* [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/) (For **chrome** selenium browser, 2.29+ for headless mode)
|
|
48
49
|
* [GeckoDriver](https://github.com/mozilla/geckodriver/releases) (For **firefox** selenium browser)
|
|
49
50
|
* [SafariDriver](https://webkit.org/blog/6900/webdriver-support-in-safari-10/) (For **safari** selenium browser)
|
|
50
|
-
* [QT](https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit) (For **webkit** driver only)
|
|
51
51
|
* [Chrome](https://www.google.com/chrome/browser/desktop/index.html) v.59+ (For **headless chrome** support)
|
|
52
|
+
* [Firefox](https://www.mozilla.org/en-US/firefox/new/) v.56+ (For **headless firefox** support)
|
|
53
|
+
* [Android SDK](https://developer.android.com/studio) and [Appium](https://appium.io/docs/en/about-appium/getting-started) (For Appium driver)
|
|
52
54
|
## Setup
|
|
53
55
|
To install, type
|
|
54
56
|
|
|
@@ -65,7 +67,7 @@ To generate the project with [Cucumber](https://cucumber.io/), type:
|
|
|
65
67
|
howitzer new <PROJECT NAME> --cucumber
|
|
66
68
|
```
|
|
67
69
|
|
|
68
|
-
With [Rspec](
|
|
70
|
+
With [Rspec](https://rspec.info/):
|
|
69
71
|
|
|
70
72
|
```bash
|
|
71
73
|
howitzer new <PROJECT NAME> --rspec
|
|
@@ -133,6 +135,8 @@ Don't forget to review the difference, to see if there were any unexpected chang
|
|
|
133
135
|
Contributing
|
|
134
136
|
------------
|
|
135
137
|
|
|
138
|
+
[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/0)[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/1)[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/2)[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/3)[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/4)[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/5)[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/6)[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/7)
|
|
139
|
+
|
|
136
140
|
Please see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
137
141
|
|
|
138
142
|
howitzer was originally designed by Roman Parashchenko and is now maintained by StrongQA team. You can find list of contributors here [open source
|
|
@@ -141,7 +145,7 @@ community](https://github.com/strongqa/howitzer/graphs/contributors).
|
|
|
141
145
|
License
|
|
142
146
|
-------
|
|
143
147
|
|
|
144
|
-
howitzer is Copyright © 2012-
|
|
148
|
+
howitzer is Copyright © 2012-2021 Roman Parashchenko and StrongQA LLC. It is free
|
|
145
149
|
software, and may be redistributed under the terms specified in the
|
|
146
150
|
[LICENSE](LICENSE) file.
|
|
147
151
|
|
|
@@ -150,11 +154,11 @@ About StrongQA
|
|
|
150
154
|
|
|
151
155
|

|
|
152
156
|
|
|
153
|
-
howitzer is maintained and funded by StrongQA,
|
|
154
|
-
The names and logos for StrongQA are trademarks of StrongQA,
|
|
157
|
+
howitzer is maintained and funded by StrongQA, LLC.
|
|
158
|
+
The names and logos for StrongQA are trademarks of StrongQA, LLC.
|
|
155
159
|
|
|
156
160
|
We love open source software!
|
|
157
161
|
See [our other projects][testing_solutions] or [hire us][hire] to consult and develop testing solutions.
|
|
158
162
|
|
|
159
|
-
[testing_solutions]:
|
|
163
|
+
[testing_solutions]: https://strongqa.com/services/testing-solutions?utm_source=github
|
|
160
164
|
[hire]: https://strongqa.com?utm_source=github
|
data/bin/howitzer
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
+
require 'colorized_string'
|
|
2
3
|
require 'gli'
|
|
3
4
|
require_relative '../lib/howitzer/version'
|
|
4
5
|
|
|
@@ -26,9 +27,9 @@ module HowitzerCli
|
|
|
26
27
|
validate_options(options)
|
|
27
28
|
load_generators
|
|
28
29
|
path_to_dir = File.join(Dir.pwd, args.first)
|
|
29
|
-
puts ' * New project directory creation ...'
|
|
30
|
+
puts ColorizedString.new(' * New project directory creation ...').light_cyan
|
|
30
31
|
Dir.mkdir(path_to_dir)
|
|
31
|
-
puts " Created
|
|
32
|
+
puts " #{ColorizedString.new('Created').light_green} './#{args.first}' folder"
|
|
32
33
|
Dir.chdir(path_to_dir)
|
|
33
34
|
Howitzer::ConfigGenerator.new(options)
|
|
34
35
|
Howitzer::WebGenerator.new(options)
|
|
@@ -43,9 +44,9 @@ module HowitzerCli
|
|
|
43
44
|
elsif options['turnip']
|
|
44
45
|
Howitzer::TurnipGenerator.new(options)
|
|
45
46
|
end
|
|
46
|
-
puts '[WARN] Extra parameters were skipped' if args.size > 1
|
|
47
|
+
puts ColorizedString.new('[WARN] Extra parameters were skipped').yellow if args.size > 1
|
|
47
48
|
elsif args.size.zero?
|
|
48
|
-
exit_now!('Please specify <PROJECT NAME>', 64)
|
|
49
|
+
exit_now!(ColorizedString.new('Please specify <PROJECT NAME>').red, 64)
|
|
49
50
|
end
|
|
50
51
|
end
|
|
51
52
|
end
|
|
@@ -80,11 +81,11 @@ module HowitzerCli
|
|
|
80
81
|
def validate_options(options)
|
|
81
82
|
return if [options[:cucumber], options[:rspec], options[:turnip]].count { |el| el } == 1
|
|
82
83
|
|
|
83
|
-
exit_now!('Provide --cucumber, --rspec or --turnip option', 64)
|
|
84
|
+
exit_now!(ColorizedString.new('Provide --cucumber, --rspec or --turnip option').red, 64)
|
|
84
85
|
end
|
|
85
86
|
|
|
86
87
|
def check_project_presence
|
|
87
|
-
exit_now!('Current directory is not Howitzer project', 126) unless howitzer_project?
|
|
88
|
+
exit_now!(ColorizedString.new('Current directory is not Howitzer project').red, 126) unless howitzer_project?
|
|
88
89
|
end
|
|
89
90
|
|
|
90
91
|
def howitzer_project?
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
require 'colorized_string'
|
|
1
2
|
require 'fileutils'
|
|
2
3
|
require 'erb'
|
|
3
4
|
require 'ostruct'
|
|
@@ -29,7 +30,7 @@ module Howitzer
|
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
def print_banner
|
|
32
|
-
logger.puts banner unless banner.empty?
|
|
33
|
+
logger.puts ColorizedString.new(banner.chomp).light_cyan unless banner.empty?
|
|
33
34
|
end
|
|
34
35
|
|
|
35
36
|
def print_info(data)
|
|
@@ -41,7 +42,7 @@ module Howitzer
|
|
|
41
42
|
end
|
|
42
43
|
|
|
43
44
|
def puts_error(data)
|
|
44
|
-
logger.puts " ERROR: #{data}"
|
|
45
|
+
logger.puts ColorizedString.new(" ERROR: #{data}").red
|
|
45
46
|
end
|
|
46
47
|
end
|
|
47
48
|
|
|
@@ -88,7 +89,8 @@ module Howitzer
|
|
|
88
89
|
copy_templates_file_exist(data, destination_path, source_path)
|
|
89
90
|
else
|
|
90
91
|
write_template(destination_path, source_path)
|
|
91
|
-
puts_info "Added template '#{data[:source]}' with
|
|
92
|
+
puts_info "#{ColorizedString.new('Added').light_green} template '#{data[:source]}' with"\
|
|
93
|
+
" params '#{@options}' to destination '#{data[:destination]}'"
|
|
92
94
|
end
|
|
93
95
|
end
|
|
94
96
|
end
|
|
@@ -103,14 +105,13 @@ module Howitzer
|
|
|
103
105
|
end
|
|
104
106
|
|
|
105
107
|
def copy_with_path(data)
|
|
106
|
-
src =
|
|
107
|
-
dst = dest_path(data[:destination])
|
|
108
|
+
src, dst = get_source_and_destination(data)
|
|
108
109
|
FileUtils.mkdir_p(File.dirname(dst))
|
|
109
110
|
if File.exist?(dst)
|
|
110
111
|
copy_with_path_file_exist(data, src, dst)
|
|
111
112
|
else
|
|
112
113
|
FileUtils.cp(src, dst)
|
|
113
|
-
puts_info("Added '#{data[:destination]}' file")
|
|
114
|
+
puts_info("#{ColorizedString.new('Added').light_green} '#{data[:destination]}' file")
|
|
114
115
|
end
|
|
115
116
|
rescue => e
|
|
116
117
|
puts_error("Impossible to create '#{data[:destination]}' file. Reason: #{e.message}")
|
|
@@ -118,24 +119,37 @@ module Howitzer
|
|
|
118
119
|
|
|
119
120
|
def write_template(dest_path, source_path)
|
|
120
121
|
File.open(dest_path, 'w+') do |f|
|
|
121
|
-
f.write(ERB.new(File.open(source_path, 'r').read
|
|
122
|
+
f.write(ERB.new(File.open(source_path, 'r').read, trim_mode: '-')
|
|
123
|
+
.result(OpenStruct.new(@options).instance_eval { binding }))
|
|
122
124
|
end
|
|
123
125
|
end
|
|
124
126
|
|
|
125
127
|
private
|
|
126
128
|
|
|
129
|
+
def get_source_and_destination(data)
|
|
130
|
+
[source_path(data[:source]), dest_path(data[:destination])]
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def conflict_file_msg(data)
|
|
134
|
+
ColorizedString.new("Conflict with '#{data[:destination]}' file").yellow
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
def overwrite_file_msg(data)
|
|
138
|
+
ColorizedString.new(" Overwrite '#{data[:destination]}' file? [Yn]:").yellow
|
|
139
|
+
end
|
|
140
|
+
|
|
127
141
|
def copy_templates_file_exist(data, destination_path, source_path)
|
|
128
|
-
puts_info("Conflict with '#{data[:destination]}' template")
|
|
129
|
-
print_info(" Overwrite '#{data[:destination]}' template? [Yn]:")
|
|
142
|
+
puts_info(ColorizedString.new("Conflict with '#{data[:destination]}' template").yellow)
|
|
143
|
+
print_info(ColorizedString.new(" Overwrite '#{data[:destination]}' template? [Yn]:").yellow)
|
|
130
144
|
copy_templates_overwrite(gets.strip.downcase, data, destination_path, source_path)
|
|
131
145
|
end
|
|
132
146
|
|
|
133
147
|
def copy_with_path_file_exist(data, source, destination)
|
|
134
148
|
if FileUtils.identical?(source, destination)
|
|
135
|
-
puts_info("Identical '#{data[:destination]}' file")
|
|
149
|
+
puts_info("#{ColorizedString.new('Identical').light_green} '#{data[:destination]}' file")
|
|
136
150
|
else
|
|
137
|
-
puts_info(
|
|
138
|
-
print_info(
|
|
151
|
+
puts_info(conflict_file_msg(data))
|
|
152
|
+
print_info(overwrite_file_msg(data))
|
|
139
153
|
copy_with_path_overwrite(gets.strip.downcase, data, source, destination)
|
|
140
154
|
end
|
|
141
155
|
end
|
|
@@ -144,9 +158,9 @@ module Howitzer
|
|
|
144
158
|
case answer
|
|
145
159
|
when 'y'
|
|
146
160
|
write_template(destination_path, source_path)
|
|
147
|
-
puts_info(" Forced '#{data[:destination]}' template")
|
|
161
|
+
puts_info(" #{ColorizedString.new('Forced').light_green} '#{data[:destination]}' template")
|
|
148
162
|
when 'n'
|
|
149
|
-
puts_info(" Skipped '#{data[:destination]}' template")
|
|
163
|
+
puts_info(" #{ColorizedString.new('Skipped').light_black} '#{data[:destination]}' template")
|
|
150
164
|
else nil
|
|
151
165
|
end
|
|
152
166
|
end
|
|
@@ -155,9 +169,9 @@ module Howitzer
|
|
|
155
169
|
case answer
|
|
156
170
|
when 'y'
|
|
157
171
|
FileUtils.cp(source, destination)
|
|
158
|
-
puts_info(" Forced '#{data[:destination]}' file")
|
|
159
|
-
when 'n'
|
|
160
|
-
puts_info(" Skipped '#{data[:destination]}' file")
|
|
172
|
+
puts_info(" #{ColorizedString.new('Forced').light_green} '#{data[:destination]}' file")
|
|
173
|
+
when 'n'
|
|
174
|
+
puts_info(" #{ColorizedString.new('Skipped').light_black} '#{data[:destination]}' file")
|
|
161
175
|
else nil
|
|
162
176
|
end
|
|
163
177
|
end
|
|
@@ -8,16 +8,24 @@ module Howitzer
|
|
|
8
8
|
{ source: 'boot.rb', destination: 'config/boot.rb' },
|
|
9
9
|
{ source: 'custom.yml', destination: 'config/custom.yml' },
|
|
10
10
|
{ source: 'capybara.rb', destination: 'config/capybara.rb' },
|
|
11
|
-
{ source: 'default.yml', destination: 'config/default.yml' }
|
|
11
|
+
{ source: 'default.yml', destination: 'config/default.yml' },
|
|
12
|
+
{ source: 'drivers/browserstack.rb', destination: 'config/drivers/browserstack.rb' },
|
|
13
|
+
{ source: 'drivers/crossbrowsertesting.rb', destination: 'config/drivers/crossbrowsertesting.rb' },
|
|
14
|
+
{ source: 'drivers/headless_chrome.rb', destination: 'config/drivers/headless_chrome.rb' },
|
|
15
|
+
{ source: 'drivers/headless_firefox.rb', destination: 'config/drivers/headless_firefox.rb' },
|
|
16
|
+
{ source: 'drivers/sauce.rb', destination: 'config/drivers/sauce.rb' },
|
|
17
|
+
{ source: 'drivers/selenium.rb', destination: 'config/drivers/selenium.rb' },
|
|
18
|
+
{ source: 'drivers/selenium_grid.rb', destination: 'config/drivers/selenium_grid.rb' },
|
|
19
|
+
{ source: 'drivers/testingbot.rb', destination: 'config/drivers/testingbot.rb' }
|
|
12
20
|
] }
|
|
13
21
|
end
|
|
14
22
|
|
|
15
23
|
protected
|
|
16
24
|
|
|
17
25
|
def banner
|
|
18
|
-
<<-
|
|
26
|
+
<<-MSG
|
|
19
27
|
* Config files generation ...
|
|
20
|
-
|
|
28
|
+
MSG
|
|
21
29
|
end
|
|
22
30
|
end
|
|
23
31
|
end
|
|
@@ -3,12 +3,12 @@ require 'bundler/setup'
|
|
|
3
3
|
|
|
4
4
|
Bundler.require(:default)
|
|
5
5
|
|
|
6
|
-
Dir[
|
|
6
|
+
Dir[ # rubocop:disable Lint/NonDeterministicRequireOrder
|
|
7
7
|
'./emails/**/*.rb',
|
|
8
8
|
'./web/sections/**/*.rb',
|
|
9
9
|
'./web/pages/**/*.rb',
|
|
10
10
|
'./prerequisites/models/**/*.rb',
|
|
11
|
-
'./prerequisites/
|
|
11
|
+
'./prerequisites/factory_bot.rb'
|
|
12
12
|
].each { |f| require f }
|
|
13
13
|
|
|
14
|
-
String.
|
|
14
|
+
String.include Howitzer::Utils::StringExtensions
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
HOWITZER_KNOWN_DRIVERS = %i[
|
|
2
|
+
appium
|
|
2
3
|
selenium
|
|
3
4
|
selenium_grid
|
|
4
|
-
webkit
|
|
5
|
-
poltergeist
|
|
6
|
-
phantomjs
|
|
7
5
|
sauce
|
|
8
6
|
testingbot
|
|
9
7
|
browserstack
|
|
8
|
+
crossbrowsertesting
|
|
10
9
|
headless_chrome
|
|
10
|
+
headless_firefox
|
|
11
11
|
].freeze
|
|
12
12
|
|
|
13
13
|
unless HOWITZER_KNOWN_DRIVERS.include?(Howitzer.driver.to_s.to_sym)
|
|
14
14
|
raise Howitzer::UnknownDriverError, "Unknown '#{Howitzer.driver}' driver." \
|
|
15
|
-
|
|
15
|
+
" Check your settings, it should be one of #{HOWITZER_KNOWN_DRIVERS}"
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
Capybara.configure do |config|
|
|
@@ -36,135 +36,10 @@ module CapybaraHelpers
|
|
|
36
36
|
extend Howitzer::CapybaraHelpers
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
Capybara.register_driver :selenium do |app|
|
|
42
|
-
params = { browser: Howitzer.selenium_browser.to_s.to_sym }
|
|
43
|
-
if CapybaraHelpers.ff_browser?
|
|
44
|
-
ff_profile = Selenium::WebDriver::Firefox::Profile.new.tap do |profile|
|
|
45
|
-
profile['network.http.phishy-userpass-length'] = 255
|
|
46
|
-
profile['browser.safebrowsing.malware.enabled'] = false
|
|
47
|
-
profile['network.automatic-ntlm-auth.allow-non-fqdn'] = true
|
|
48
|
-
profile['network.ntlm.send-lm-response'] = true
|
|
49
|
-
profile['network.automatic-ntlm-auth.trusted-uris'] = Howitzer.app_host
|
|
50
|
-
end
|
|
51
|
-
params[:profile] = ff_profile
|
|
52
|
-
end
|
|
53
|
-
Capybara::Selenium::Driver.new app, params
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
# :headless_chrome driver
|
|
57
|
-
|
|
58
|
-
Capybara.register_driver :headless_chrome do |app|
|
|
59
|
-
startup_flags = ['--headless']
|
|
60
|
-
startup_flags << '-start-maximized' if Howitzer.maximized_window
|
|
61
|
-
startup_flags.concat(Howitzer.headless_chrome_flags.split(/\s*,\s*/)) if Howitzer.headless_chrome_flags
|
|
62
|
-
params = { browser: :chrome, switches: startup_flags }
|
|
63
|
-
Capybara::Selenium::Driver.new app, params
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
# :webkit driver
|
|
67
|
-
|
|
68
|
-
if Howitzer.driver.to_sym == :webkit
|
|
69
|
-
CapybaraHelpers.load_driver_gem!(:webkit, 'capybara-webkit', 'capybara-webkit')
|
|
70
|
-
Capybara::Webkit.configure do |config|
|
|
71
|
-
config.allow_url(Howitzer.app_host)
|
|
72
|
-
end
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
# :poltergeist driver
|
|
76
|
-
|
|
77
|
-
if Howitzer.driver.to_sym == :poltergeist
|
|
78
|
-
CapybaraHelpers.load_driver_gem!(:poltergeist, 'capybara/poltergeist', 'poltergeist')
|
|
79
|
-
|
|
80
|
-
Capybara.register_driver :poltergeist do |app|
|
|
81
|
-
Capybara::Poltergeist::Driver.new(
|
|
82
|
-
app,
|
|
83
|
-
js_errors: !Howitzer.phantom_ignore_js_errors,
|
|
84
|
-
phantomjs_options: ["--ignore-ssl-errors=#{Howitzer.phantom_ignore_ssl_errors ? 'yes' : 'no'}"]
|
|
85
|
-
)
|
|
86
|
-
end
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
# :phantomjs driver
|
|
90
|
-
|
|
91
|
-
Capybara.register_driver :phantomjs do |app|
|
|
92
|
-
Capybara::Selenium::Driver.new(
|
|
93
|
-
app, browser: :phantomjs,
|
|
94
|
-
desired_capabilities: {
|
|
95
|
-
javascript_enabled: !Howitzer.phantom_ignore_js_errors
|
|
96
|
-
},
|
|
97
|
-
driver_opts: {
|
|
98
|
-
args: ["--ignore-ssl-errors=#{Howitzer.phantom_ignore_ssl_errors ? 'yes' : 'no'}"]
|
|
99
|
-
}
|
|
100
|
-
)
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
# :sauce driver
|
|
104
|
-
|
|
105
|
-
Capybara.register_driver :sauce do |app|
|
|
106
|
-
caps = CapybaraHelpers.required_cloud_caps.merge(
|
|
107
|
-
maxDuration: Howitzer.cloud_max_duration,
|
|
108
|
-
idleTimeout: Howitzer.cloud_sauce_idle_timeout,
|
|
109
|
-
recordScreenshots: Howitzer.cloud_sauce_record_screenshots,
|
|
110
|
-
videoUploadOnPass: Howitzer.cloud_sauce_video_upload_on_pass
|
|
111
|
-
)
|
|
112
|
-
url = "http://#{Howitzer.cloud_auth_login}:#{Howitzer.cloud_auth_pass}@ondemand.saucelabs.com:80/wd/hub"
|
|
113
|
-
CapybaraHelpers.cloud_driver(app, caps, url)
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
# :testingbot driver
|
|
117
|
-
|
|
118
|
-
Capybara.register_driver :testingbot do |app|
|
|
119
|
-
caps = CapybaraHelpers.required_cloud_caps.merge(
|
|
120
|
-
maxduration: Howitzer.cloud_max_duration,
|
|
121
|
-
idletimeout: Howitzer.cloud_testingbot_idle_timeout,
|
|
122
|
-
screenshot: Howitzer.cloud_testingbot_screenshots
|
|
123
|
-
)
|
|
124
|
-
url = "http://#{Howitzer.cloud_auth_login}:#{Howitzer.cloud_auth_pass}@hub.testingbot.com/wd/hub"
|
|
125
|
-
CapybaraHelpers.cloud_driver(app, caps, url)
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
# :browserstack driver
|
|
129
|
-
|
|
130
|
-
Capybara.register_driver :browserstack do |app|
|
|
131
|
-
caps = CapybaraHelpers.required_cloud_caps.merge(
|
|
132
|
-
project: Howitzer.cloud_bstack_project,
|
|
133
|
-
build: Howitzer.cloud_bstack_build
|
|
134
|
-
)
|
|
135
|
-
caps[:resolution] = Howitzer.cloud_bstack_resolution if Howitzer.cloud_bstack_resolution.present?
|
|
136
|
-
caps[:device] = Howitzer.cloud_bstack_mobile_device if Howitzer.cloud_bstack_mobile_device.present?
|
|
137
|
-
url = "http://#{Howitzer.cloud_auth_login}:#{Howitzer.cloud_auth_pass}@hub.browserstack.com/wd/hub"
|
|
138
|
-
CapybaraHelpers.cloud_driver(app, caps, url)
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
# :selenium_grid driver
|
|
142
|
-
|
|
143
|
-
Capybara.register_driver :selenium_grid do |app|
|
|
144
|
-
caps = if CapybaraHelpers.ie_browser?
|
|
145
|
-
Selenium::WebDriver::Remote::Capabilities.internet_explorer
|
|
146
|
-
elsif CapybaraHelpers.ff_browser?
|
|
147
|
-
Selenium::WebDriver::Remote::Capabilities.firefox
|
|
148
|
-
elsif CapybaraHelpers.chrome_browser?
|
|
149
|
-
Selenium::WebDriver::Remote::Capabilities.chrome
|
|
150
|
-
elsif CapybaraHelpers.safari_browser?
|
|
151
|
-
Selenium::WebDriver::Remote::Capabilities.safari
|
|
152
|
-
else
|
|
153
|
-
raise Howitzer::UnknownBrowserError, "Unknown '#{Howitzer.selenium_browser}' selenium_browser." \
|
|
154
|
-
' Check your settings, it should be one of' \
|
|
155
|
-
' [:ie, :iexplore, :ff, :firefox, :chrome, safari]'
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
Capybara::Selenium::Driver.new(app, browser: :remote, url: Howitzer.selenium_hub_url, desired_capabilities: caps)
|
|
159
|
-
end
|
|
39
|
+
require_relative "drivers/#{Howitzer.driver}"
|
|
160
40
|
|
|
161
41
|
Capybara.save_path = Howitzer.log_dir
|
|
162
|
-
|
|
163
|
-
driver.browser.save_screenshot path
|
|
164
|
-
end
|
|
165
|
-
Capybara::Screenshot.register_driver(:headless_chrome) do |driver, path|
|
|
166
|
-
driver.browser.save_screenshot path
|
|
167
|
-
end
|
|
42
|
+
|
|
168
43
|
Capybara::Screenshot.append_timestamp = false
|
|
169
44
|
Capybara::Screenshot.register_filename_prefix_formatter(:default) do
|
|
170
45
|
"capybara-screenshot-#{Gen.serial}"
|