testcentricity_web 4.1.6 → 4.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rspec +2 -1
  4. data/.ruby-version +1 -0
  5. data/.simplecov +5 -1
  6. data/CHANGELOG.md +43 -0
  7. data/README.md +14 -13
  8. data/Rakefile +99 -21
  9. data/config/cucumber.yml +32 -11
  10. data/config/locales/en-US.yml +56 -0
  11. data/config/test_data/LOCAL_data.json +15 -0
  12. data/config/test_data/LOCAL_data.xls +0 -0
  13. data/config/test_data/LOCAL_data.yml +11 -0
  14. data/config/test_data/data.json +25 -0
  15. data/config/test_data/data.xls +0 -0
  16. data/config/test_data/data.yml +20 -0
  17. data/{docker-compose-v3.yml → docker-compose.yml} +2 -2
  18. data/features/basic_form_page_css.feature +54 -0
  19. data/features/basic_form_page_xpath.feature +26 -0
  20. data/features/custom_controls.feature +29 -0
  21. data/features/media_players.feature +67 -0
  22. data/features/step_definitions/generic_steps.rb.rb +87 -0
  23. data/features/step_definitions/media_steps.rb +30 -0
  24. data/features/support/data/form_data.rb +43 -0
  25. data/features/support/env.rb +18 -10
  26. data/features/support/hooks.rb +26 -1
  27. data/features/support/pages/base_test_page.rb +22 -0
  28. data/features/support/pages/{basic_css_test_page.rb → basic_css_form_page.rb} +12 -8
  29. data/features/support/pages/{basic_test_page.rb → basic_form_page.rb} +227 -36
  30. data/features/support/pages/{basic_xpath_test_page.rb → basic_xpath_form_page.rb} +12 -7
  31. data/features/support/pages/custom_controls_page.rb +263 -0
  32. data/features/support/pages/indexed_sections_page.rb +57 -0
  33. data/features/support/pages/media_test_page.rb +207 -0
  34. data/features/support/sections/header_nav.rb +48 -0
  35. data/features/support/sections/product_card.rb +39 -0
  36. data/features/support/world_data.rb +12 -0
  37. data/features/support/world_pages.rb +5 -2
  38. data/lib/testcentricity_web/appium_server.rb +5 -0
  39. data/lib/testcentricity_web/browser_helper.rb +0 -6
  40. data/lib/testcentricity_web/data_objects/data_objects_helper.rb +7 -0
  41. data/lib/testcentricity_web/data_objects/environment.rb +14 -0
  42. data/lib/testcentricity_web/data_objects/excel_helper.rb +60 -59
  43. data/lib/testcentricity_web/version.rb +1 -1
  44. data/lib/testcentricity_web/web_core/drag_drop_helper.rb +4 -0
  45. data/lib/testcentricity_web/web_core/page_object.rb +1 -8
  46. data/lib/testcentricity_web/web_core/page_objects_helper.rb +4 -2
  47. data/lib/testcentricity_web/web_core/page_section.rb +1 -1
  48. data/lib/testcentricity_web/web_core/webdriver_helper.rb +60 -44
  49. data/lib/testcentricity_web/web_elements/checkbox.rb +49 -19
  50. data/lib/testcentricity_web/web_elements/file_field.rb +9 -5
  51. data/lib/testcentricity_web/web_elements/image.rb +2 -1
  52. data/lib/testcentricity_web/web_elements/media.rb +46 -12
  53. data/lib/testcentricity_web/web_elements/radio.rb +51 -16
  54. data/lib/testcentricity_web/web_elements/select_list.rb +12 -12
  55. data/lib/testcentricity_web/web_elements/ui_elements_helper.rb +22 -9
  56. data/lib/testcentricity_web/web_elements/video.rb +2 -2
  57. data/spec/fixtures/page_object.rb +22 -0
  58. data/spec/fixtures/section_object.rb +21 -0
  59. data/spec/spec_helper.rb +31 -0
  60. data/spec/testcentricity_web/browser_spec.rb +41 -0
  61. data/spec/testcentricity_web/elements/audio_spec.rb +68 -0
  62. data/spec/testcentricity_web/elements/button_spec.rb +18 -0
  63. data/spec/testcentricity_web/elements/checkbox_spec.rb +33 -0
  64. data/spec/testcentricity_web/elements/file_field_spec.rb +13 -0
  65. data/spec/testcentricity_web/elements/image_spec.rb +33 -0
  66. data/spec/testcentricity_web/elements/label_spec.rb +18 -0
  67. data/spec/testcentricity_web/elements/link_spec.rb +23 -0
  68. data/spec/testcentricity_web/elements/list_spec.rb +13 -0
  69. data/spec/testcentricity_web/elements/radio_spec.rb +28 -0
  70. data/spec/testcentricity_web/elements/ui_element_spec.rb +125 -0
  71. data/spec/testcentricity_web/elements/video_spec.rb +68 -0
  72. data/spec/testcentricity_web/helper_specs/object_helpers_spec.rb +39 -0
  73. data/spec/testcentricity_web/helper_specs/string_helpers_spec.rb +49 -0
  74. data/spec/testcentricity_web/page_object_spec.rb +90 -0
  75. data/spec/testcentricity_web/section_object_spec.rb +72 -0
  76. data/spec/testcentricity_web/version_spec.rb +7 -0
  77. data/spec/testcentricity_web/webdriver_connect/grid_webdriver_spec.rb +72 -0
  78. data/spec/testcentricity_web/webdriver_connect/local_webdriver_spec.rb +86 -0
  79. data/spec/testcentricity_web/webdriver_connect/mobile_webdriver_spec.rb +65 -0
  80. data/test_site/basic_test_page.html +51 -1
  81. data/test_site/chosen-sprite.png +0 -0
  82. data/test_site/chosen-sprite@2x.png +0 -0
  83. data/test_site/chosen.css +496 -0
  84. data/test_site/chosen.jquery.js +1359 -0
  85. data/test_site/chosen.jquery.min.js +3 -0
  86. data/test_site/chosen.min.css +11 -0
  87. data/test_site/chosen.proto.js +1399 -0
  88. data/test_site/chosen.proto.min.js +3 -0
  89. data/test_site/composer.json +36 -0
  90. data/test_site/custom_controls_page.html +629 -0
  91. data/test_site/docsupport/chosen.png +0 -0
  92. data/test_site/docsupport/init.js +11 -0
  93. data/test_site/docsupport/init.proto.js +16 -0
  94. data/test_site/docsupport/jquery-1.12.4.min.js +5 -0
  95. data/test_site/docsupport/jquery-3.2.1.min.js +4 -0
  96. data/test_site/docsupport/oss-credit.png +0 -0
  97. data/test_site/docsupport/prism.css +108 -0
  98. data/test_site/docsupport/prism.js +9 -0
  99. data/test_site/docsupport/prototype-1.7.0.0.js +6082 -0
  100. data/test_site/docsupport/style.css +219 -0
  101. data/test_site/images/Blouse_Black.jpg +0 -0
  102. data/test_site/images/Printed_Dress.jpg +0 -0
  103. data/test_site/images/T-shirt.jpg +0 -0
  104. data/test_site/images/jeans3.jpg +0 -0
  105. data/test_site/indexed_sections_page.html +215 -0
  106. data/test_site/media/MIB2-subtitles-pt-BR.vtt +49 -0
  107. data/test_site/media/MIB2.mp4 +0 -0
  108. data/test_site/media/bbc_scotland_report.mp3 +0 -0
  109. data/test_site/media/count_and_bars.mp4 +0 -0
  110. data/test_site/media_page.html +60 -7
  111. data/testcentricity_web.gemspec +14 -8
  112. metadata +197 -25
  113. data/Gemfile.lock +0 -170
  114. data/features/basic_test_page_css.feature +0 -24
  115. data/features/basic_test_page_xpath.feature +0 -24
  116. data/features/support/pages/media_page.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98ea25aaf7cff4f07b966b6cac829a2cd6ad3234403e3a01257ff6dd07beaf38
4
- data.tar.gz: 20082c59c2d9f7c5e69959500b4bc97e10f1dc93309f1ec601acdf7b0cf8d29c
3
+ metadata.gz: c35f1c09951d1a58be2d3bac921d2d221311edf3b4464c5d4806c7a30a57c0f2
4
+ data.tar.gz: bbe72af137b6808721f7a87b26032c42d78bbf4708ff88ed34c753ebcec85c46
5
5
  SHA512:
6
- metadata.gz: 40ccfaa119abc07f1bb3254cf05e2c3b5d28548b92c65da43faabc3b524af4b074973767e79da7901de09a609ee95af65e3525ea60b49dd3676b88a6956e7478
7
- data.tar.gz: 1959d24e265fdbb21e088f4192b0de5a86f227d22b0b73870a0ab2ed12430d2b898718d2fcbb4b4330f8ec689bef770d09b3cefa39ec0a0cb75b8ab624078abb
6
+ metadata.gz: 0607f397cd9d6564623218d3e88f541a04f17c9b4b8cc96eb50571bc787cfa46927651dc38cfc7765129dd33303fbd3c130720dc809940cf401a336756c3d7c1
7
+ data.tar.gz: 11cc150624658854f69575361345dca970a3cf567e1b29e6797450dc22df88f53b069374a63ab8e12f83e7638a28386b0edd0d96e6707720f41e1e6fa621c1f5
data/.gitignore CHANGED
@@ -15,6 +15,7 @@ Thumbs.db
15
15
  /pkg/
16
16
  /spec/reports/
17
17
  /tmp/
18
+ Gemfile*.lock
18
19
 
19
20
  # rspec failure tracking
20
21
  .rspec_status
data/.rspec CHANGED
@@ -1,3 +1,4 @@
1
- --format documentation
1
+ # General configuration options
2
2
  --color
3
3
  --require spec_helper
4
+ --format documentation
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-2.7.5
data/.simplecov CHANGED
@@ -2,4 +2,8 @@
2
2
 
3
3
  require 'simplecov'
4
4
 
5
- SimpleCov.start
5
+ SimpleCov.start do
6
+ add_filter '/features/'
7
+ add_filter '/spec/'
8
+ merge_timeout 3600
9
+ end
data/CHANGELOG.md CHANGED
@@ -2,6 +2,49 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
 
5
+ ## [4.1.9] - 18-APR-2022
6
+
7
+ ### Fixed
8
+ * `PageSection.radio` no longer returns `wrong number of arguments` error.
9
+ * `PageObject.populate_data_fields` and `PageSection.populate_data_fields` methods no longer skip setting checkboxes or
10
+ radio buttons to the unchecked state.
11
+
12
+ ### Added
13
+
14
+ * `CheckBox.define_custom_elements` and `Radio.define_custom_elements` methods now support specifying a child `input` component
15
+ contained by a top level `label` element.
16
+
17
+
18
+ ## [4.1.8] - 31-MAR-2022
19
+
20
+ ### Fixed
21
+ * `Image.loaded?` now correctly returns a `Boolean` value instead of a `String`.
22
+ * `Video.video_height` and `Video.video_width` now correctly returns an `Integer` value instead of a `String`.
23
+ * `UIElement.scroll_to` now works for all supported browsers.
24
+
25
+ ### Changed
26
+ * `UIElement.crossorigin` is no longer limited to `Audio` and `Video` objects.
27
+
28
+
29
+ ## [4.1.7] - 28-MAR-2022
30
+
31
+ ### Fixed
32
+ * `CheckBox.set_checkbox_state` and `Radio.set_selected_state` work on iOS simulators again.
33
+
34
+ ### Changed
35
+ * `Audio.playback_rate` and `Video.playback_rate` now return value as a `Float` instead of a `String`.
36
+ * `Audio.default_playback_rate` and `Video.default_playback_rate` now return value as a `Float` instead of a `String`.
37
+ * `Audio.current_time` and `Video.current_time` now return value as a `Float` rounded to two decimal places.
38
+ * `Audio.duration` and `Video.duration` now return value as a `Float` rounded to two decimal places.
39
+
40
+ ### Added
41
+ * `Audio.mute` and `Video.mute` methods added.
42
+ * `Audio.unmute` and `Video.unmute` methods added.
43
+ * `Audio.playback_rate` and `Video.playback_rate` now accept a `Float` value as an input for setting the playback rate
44
+ of media.
45
+ * `Audio.volume` and `Video.volume` now accept a `Float` value between 0 and 1 as an input for setting the volume of media.
46
+
47
+
5
48
  ## [4.1.6] - 21-MAR-2022
6
49
 
7
50
  ### Fixed
data/README.md CHANGED
@@ -505,6 +505,7 @@ With TestCentricity, all UI elements are based on the `UIElement` class, and inh
505
505
  element.focused?
506
506
  element.required?
507
507
  element.content_editable?
508
+ element.crossorigin
508
509
  element.get_value
509
510
  element.count
510
511
  element.style
@@ -629,6 +630,7 @@ The `verify_ui_states` method supports the following property/state pairs:
629
630
  :visible Boolean
630
631
  :hidden Boolean
631
632
  :displayed Boolean
633
+ :obscured Boolean
632
634
  :width Integer
633
635
  :height Integer
634
636
  :x Integer
@@ -639,6 +641,7 @@ The `verify_ui_states` method supports the following property/state pairs:
639
641
  :style String
640
642
  :tabindex Integer
641
643
  :required Boolean
644
+ :crossorigin String
642
645
 
643
646
  **Pages:**
644
647
 
@@ -715,7 +718,6 @@ The `verify_ui_states` method supports the following property/state pairs:
715
718
  :playback_rate Float
716
719
  :ready_state Integer
717
720
  :volume Float
718
- :crossorigin String
719
721
  :preload String
720
722
  :poster String
721
723
 
@@ -872,7 +874,7 @@ present a challenge when attempting to interact with them using Capybara and Sel
872
874
  Sometimes, radio buttons and checkboxes implemented using JS component libraries cannot be interacted with due to other UI elements
873
875
  being overlaid on top of them and the base `input(type='radio')` or `input(type='checkbox')` element not being visible.
874
876
 
875
- In the screenshots below of an airline flight search and booking page, the **Roundtrip** and **One-way** radio buttons are adorned with
877
+ In the screenshots below of an airline flight search and booking page, the **Roundtrip** and **One-way** radio buttons are adorned by
876
878
  `label` elements that also acts as proxies for their associated `input(type='radio')` elements, and they intercept the `click` actions
877
879
  that would normally be handled by the `input(type='radio')` elements.
878
880
 
@@ -890,27 +892,26 @@ elements.
890
892
  <img src="https://i.imgur.com/JcOANqZ.jpg" alt="One-way Radio button Label" title="One-way Radio button Label">
891
893
 
892
894
 
893
- The `Radio.define_custom_elements` and `CheckBox.define_custom_elements` methods provide a way to specify the `proxy` and/or `label`
894
- elements associated with the `input(type='radio')` or `input(type='checkbox')` elements. The `define_custom_elements` method
895
- should be called from an `initialize` method for the `PageObject` or `PageSection` where the `radio` or `checkbox` element is instantiated.
896
- The code snippet below demonstrates the use of the `Radio.define_custom_elements` and `CheckBox.define_custom_elements` methods to
897
- resolve the testability issues posed by the adorned **Roundtrip** and **One-way** radio buttons and the **Flexible dates** checkbox.
895
+ The `Radio.define_custom_elements` and `CheckBox.define_custom_elements` methods provide a way to specify the `input`, `proxy`
896
+ and/or `label` elements associated with the `input(type='radio')` or `input(type='checkbox')` elements. The `define_custom_elements`
897
+ method should be called from an `initialize` method for the `PageObject` or `PageSection` where the `radio` or `checkbox` element is
898
+ instantiated. The code snippet below demonstrates the use of the `Radio.define_custom_elements` and `CheckBox.define_custom_elements`
899
+ methods to resolve the testability issues posed by the adorned **Roundtrip** and **One-way** radio buttons and the **Flexible dates**
900
+ checkbox.
898
901
 
899
902
  class FlightBookingPage < TestCentricity::PageObject
900
903
  trait(:page_name) { 'Flight Booking Home' }
901
904
  trait(:page_locator) { "div[class*='bookerContainer']" }
902
905
 
903
906
  # Flight Booking page UI elements
904
- radios roundtrip_radio: 'input#roundtrip',
905
- one_way_radio: 'input#oneway'
907
+ radios roundtrip_radio: "label[for='roundtrip']",
908
+ one_way_radio: "label[for='oneway']"
906
909
  checkbox :flexible_check, 'input#flexibleDates'
907
910
 
908
911
  def initialize
909
- # define the custom element components for the Round Trip radio button
910
- radio_spec = { proxy: "label[for='roundtrip']" }
912
+ # define the custom element components for the Round Trip and One Way radio buttons
913
+ radio_spec = { input: "input[type='radio']" }
911
914
  roundtrip_radio.define_custom_elements(radio_spec)
912
- # define the custom element components for the One Way radio button
913
- radio_spec = { proxy: "label[for='oneway']" }
914
915
  one_way_radio.define_custom_elements(radio_spec)
915
916
  # define the custom element components for the Flexible Date checkbox
916
917
  check_spec = { proxy: 'label#flexDatesLabel' }
data/Rakefile CHANGED
@@ -1,37 +1,115 @@
1
1
  require 'rubygems'
2
2
  require 'cucumber'
3
3
  require 'cucumber/rake/task'
4
+ require 'docker/compose'
5
+ require 'parallel_tests'
4
6
  require 'rake'
7
+ require 'rspec/core/rake_task'
8
+ require 'simplecov'
9
+ require 'yard'
5
10
 
6
11
 
7
- namespace :features do
8
- Cucumber::Rake::Task.new(:edge) do |t|
9
- t.profile = 'edge'
10
- end
12
+ desc 'Run required specs'
13
+ RSpec::Core::RakeTask.new(:required_specs) do |t|
14
+ t.rspec_opts = '--tag required'
15
+ end
11
16
 
12
- Cucumber::Rake::Task.new(:chrome) do |t|
13
- t.profile = 'chrome'
14
- end
15
17
 
16
- Cucumber::Rake::Task.new(:edge_headless) do |t|
17
- t.profile = 'edge_headless'
18
- end
18
+ desc 'Run grid WebDriver specs'
19
+ RSpec::Core::RakeTask.new(:grid_specs) do |t|
20
+ t.rspec_opts = '--tag grid'
21
+ end
19
22
 
20
- Cucumber::Rake::Task.new(:chrome_headless) do |t|
21
- t.profile = 'chrome_headless'
22
- end
23
23
 
24
- Cucumber::Rake::Task.new(:safari) do |t|
25
- t.profile = 'safari'
26
- end
24
+ desc 'Run mobile WebDriver specs'
25
+ RSpec::Core::RakeTask.new(:mobile_specs) do |t|
26
+ t.rspec_opts = '--tag mobile'
27
+ end
27
28
 
28
- Cucumber::Rake::Task.new(:firefox) do |t|
29
- t.profile = 'firefox'
29
+
30
+ desc 'Run Cucumber features on local Safari browser'
31
+ Cucumber::Rake::Task.new(:safari_local) do |t|
32
+ t.profile = 'safari_local'
33
+ end
34
+
35
+
36
+ desc 'Run Cucumber features on iOS simulator'
37
+ Cucumber::Rake::Task.new(:ios_remote) do |t|
38
+ t.profile = 'ios_remote'
39
+ end
40
+
41
+
42
+ desc 'Run required Cucumber features on local web browsers'
43
+ task :required_cukes do
44
+ %w[chrome_local chrome_headless firefox_local firefox_headless edge_local edge_headless ipad_pro_12_local].each do |profile|
45
+ system "parallel_cucumber features/ -o '-p #{profile}' -n 6 --group-by scenarios"
30
46
  end
47
+ end
48
+
31
49
 
32
- Cucumber::Rake::Task.new(:firefox_headless) do |t|
33
- t.profile = 'firefox_headless'
50
+ desc 'Run grid Cucumber features on Dockerized Selenium 4 Grid'
51
+ task :grid_cukes do
52
+ # start up Selenium 4 Grid
53
+ compose = Docker::Compose.new
54
+ compose.version
55
+ compose.up(detached: true)
56
+ # run grid features
57
+ %w[chrome_grid firefox_grid edge_grid ipad_pro_12_grid].each do |profile|
58
+ system "parallel_cucumber features/ -o '-p #{profile}' -n 4 --group-by scenarios"
34
59
  end
60
+ # shut down Selenium Grid
61
+ compose.down(remove_volumes: true)
62
+ end
63
+
35
64
 
36
- task :all => [:edge, :edge_headless, :chrome, :chrome_headless, :safari]
65
+ desc 'Run grid specs on Dockerized Selenium 4 Grid'
66
+ task :docker_grid_specs do
67
+ # start up Selenium 4 Grid
68
+ compose = Docker::Compose.new
69
+ compose.version
70
+ compose.up(detached: true)
71
+ # run grid specs
72
+ Rake::Task[:grid_specs].invoke
73
+ # shut down Selenium Grid
74
+ compose.down(remove_volumes: true)
37
75
  end
76
+
77
+
78
+ desc 'Run mobile web specs and Cucumber features'
79
+ task mobile: [:mobile_specs, :ios_remote]
80
+
81
+
82
+ desc 'Run required specs and Cucumber features'
83
+ task required: [:required_specs, :required_cukes]
84
+
85
+
86
+ desc 'Run grid specs and Cucumber features on Dockerized Selenium 4 Grid'
87
+ task grid: [:docker_grid_specs, :grid_cukes]
88
+
89
+
90
+ desc 'Run all specs'
91
+ task all_specs: [:required_specs, :docker_grid_specs, :mobile_specs]
92
+
93
+
94
+ desc 'Run all specs and Cucumber features'
95
+ task all: [:required, :safari_local, :grid, :mobile]
96
+
97
+
98
+ desc 'Update HTML docs'
99
+ YARD::Rake::YardocTask.new(:docs) do |t|
100
+ t.files = ['lib/**/*.rb']
101
+ end
102
+
103
+
104
+ desc 'Build and release new version'
105
+ task :release do
106
+ version = TestCentricityWeb::VERSION
107
+ puts "Releasing #{version}, y/n?"
108
+ exit(1) unless $stdin.gets.chomp == 'y'
109
+ sh 'gem build testcentricity_web.gemspec && ' \
110
+ "gem push testcentricity_web-#{version}.gem"
111
+ end
112
+
113
+
114
+ desc 'Update docs, build gem, and push to RubyGems'
115
+ task ship_it: [:docs, :release]
data/config/cucumber.yml CHANGED
@@ -1,6 +1,5 @@
1
1
  <% desktop = "--require features BROWSER_TILE=true BROWSER_SIZE=1300,1000 --publish-quiet" %>
2
- <% tablet = "--tags @desktop --require features BROWSER_TILE=true --publish-quiet" %>
3
- <% mobile = "--tags @mobile --require features BROWSER_TILE=true --publish-quiet" %>
2
+ <% mobile = "--require features BROWSER_TILE=true --publish-quiet" %>
4
3
  <% reports = "--require features --format pretty --format html --out reports/test_results.html --format junit --out reports --format json --out reports/test_results.json" %>
5
4
 
6
5
 
@@ -25,20 +24,29 @@ parallel: PARALLEL=true REPORTING=true --require features --format pretty --form
25
24
  # profiles for locally hosted desktop web browsers
26
25
  #==============
27
26
 
28
- chrome: WEB_BROWSER=chrome <%= desktop %>
27
+ local: TEST_ENVIRONMENT=LOCAL
28
+ chrome: WEB_BROWSER=chrome DATA_SOURCE=yaml <%= desktop %>
29
+ edge: WEB_BROWSER=edge DATA_SOURCE=json <%= desktop %>
30
+ safari: WEB_BROWSER=safari DATA_SOURCE=Excel <%= desktop %>
29
31
  firefox: WEB_BROWSER=firefox <%= desktop %>
30
- edge: WEB_BROWSER=edge <%= desktop %>
31
- safari: WEB_BROWSER=safari <%= desktop %>
32
32
 
33
- firefox_headless: WEB_BROWSER=firefox_headless <%= desktop %>
34
- chrome_headless: WEB_BROWSER=chrome_headless <%= desktop %>
35
- edge_headless: WEB_BROWSER=edge_headless <%= desktop %>
33
+ chrome_local: --profile local --profile chrome
34
+ edge_local: --profile local --profile edge
35
+ safari_local: --profile local --profile safari
36
+ firefox_local: --profile local --profile firefox
37
+
38
+ firefox_headless: --profile local WEB_BROWSER=firefox_headless <%= desktop %>
39
+ chrome_headless: --profile local WEB_BROWSER=chrome_headless <%= desktop %>
40
+ edge_headless: --profile local WEB_BROWSER=edge_headless <%= desktop %>
36
41
 
37
42
 
38
43
  #==============
39
44
  # profile for Selenium Grid and Dockerized Selenium Grid hosted desktop web browsers
40
45
  #==============
41
- grid: SELENIUM=remote REMOTE_ENDPOINT="http://localhost:4444/wd/hub"
46
+ grid: SELENIUM=remote TEST_ENVIRONMENT=REMOTE REMOTE_ENDPOINT="http://localhost:4444/wd/hub"
47
+ chrome_grid: --profile grid --profile chrome
48
+ edge_grid: --profile grid --profile edge
49
+ firefox_grid: --profile grid --profile firefox
42
50
 
43
51
 
44
52
  #==============
@@ -49,6 +57,15 @@ landscape: ORIENTATION=landscape
49
57
  portrait: ORIENTATION=portrait
50
58
 
51
59
 
60
+ #==============
61
+ # profiles for locally hosted mobile web browsers (emulated locally in Chrome browser)
62
+ #==============
63
+
64
+ ipad_pro_11_local: --profile local WEB_BROWSER=ipad_pro_11 HOST_BROWSER=chrome --profile portrait <%= mobile %>
65
+ ipad_pro_12_local: --profile local WEB_BROWSER=ipad_pro_12_9 HOST_BROWSER=chrome --profile portrait <%= mobile %>
66
+ ipad_pro_12_grid: --profile grid WEB_BROWSER=ipad_pro_12_9 HOST_BROWSER=chrome --profile portrait <%= mobile %>
67
+
68
+
52
69
  #==============
53
70
  # profile to start Appium Server prior to running mobile browser tests on iOS or Android simulators or physical devices
54
71
  #==============
@@ -60,22 +77,26 @@ run_appium: APPIUM_SERVER=run
60
77
  # NOTE: Requires installation of XCode, iOS version specific target simulators, Appium, and the appium_capybara gem
61
78
  #==============
62
79
 
63
- appium_ios: WEB_BROWSER=appium AUTOMATION_ENGINE=XCUITest APP_PLATFORM_NAME="ios" APP_BROWSER="Safari" NEW_COMMAND_TIMEOUT=30 SHOW_SIM_KEYBOARD=false <%= desktop %>
80
+ appium_ios: WEB_BROWSER=appium AUTOMATION_ENGINE=XCUITest APP_PLATFORM_NAME="ios" APP_BROWSER="Safari" NEW_COMMAND_TIMEOUT=30 SHOW_SIM_KEYBOARD=false <%= mobile %>
64
81
  app_ios_15: --profile appium_ios APP_VERSION="15.4"
65
82
 
66
83
  ipad_pro_12_15_sim: --profile app_ios_15 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (12.9-inch) (5th generation)"
67
84
  ipad_air_15_sim: --profile app_ios_15 DEVICE_TYPE=tablet APP_DEVICE="iPad Air (5th generation)" <%= desktop %>
68
85
 
86
+ ios_remote: --profile ipad_pro_12_15_sim --profile run_appium ORIENTATION=portrait TEST_ENVIRONMENT=REMOTE
87
+
69
88
 
70
89
  #==============
71
90
  # profiles for Android mobile web browsers hosted within Android Studio Android Virtual Device emulators
72
91
  # NOTE: Requires installation of Android Studio, Android version specific virtual device simulators, Appium, and the appium_capybara gem
73
92
  #==============
74
93
 
75
- appium_android: WEB_BROWSER=appium APP_PLATFORM_NAME="Android" <%= desktop %>
94
+ appium_android: WEB_BROWSER=appium APP_PLATFORM_NAME="Android" <%= mobile %>
76
95
  app_android_12: --profile appium_android APP_BROWSER="Chrome" APP_VERSION="12.0"
77
96
  pixel_c_api31_sim: --profile app_android_12 DEVICE_TYPE=tablet APP_DEVICE="Pixel_C_API_31"
78
97
 
98
+ android_remote: --profile pixel_c_api31_sim --profile run_appium ORIENTATION=portrait TEST_ENVIRONMENT=REMOTE
99
+
79
100
 
80
101
  #==============
81
102
  # profiles for remotely hosted web browsers on the BrowserStack service
@@ -0,0 +1,56 @@
1
+ # Localization file for English/U.S. locale.
2
+
3
+ en-US:
4
+ time:
5
+ formats:
6
+ default: "%m/%d/%Y"
7
+ long: "%B %d, %Y"
8
+ short: "%b %d"
9
+ abbrev: "%b %d, %Y"
10
+ abbrev_month: "%b"
11
+ month_year: "%B %Y"
12
+ date:
13
+ abbr_day_names:
14
+ - Sun
15
+ - Mon
16
+ - Tue
17
+ - Wed
18
+ - Thu
19
+ - Fri
20
+ - Sat
21
+ abbr_month_names:
22
+ -
23
+ - Jan
24
+ - Feb
25
+ - Mar
26
+ - Apr
27
+ - May
28
+ - Jun
29
+ - Jul
30
+ - Aug
31
+ - Sep
32
+ - Oct
33
+ - Nov
34
+ - Dec
35
+ day_names:
36
+ - Sunday
37
+ - Monday
38
+ - Tuesday
39
+ - Wednesday
40
+ - Thursday
41
+ - Friday
42
+ - Saturday
43
+ month_names:
44
+ -
45
+ - January
46
+ - February
47
+ - March
48
+ - April
49
+ - May
50
+ - June
51
+ - July
52
+ - August
53
+ - September
54
+ - October
55
+ - November
56
+ - December
@@ -0,0 +1,15 @@
1
+ {
2
+ "Form_data": {
3
+ "primary": {
4
+ "username": "Thaddeus Eumbwebwe",
5
+ "password": "Pa55w0rd",
6
+ "image_filename": "Granny.jpg",
7
+ "multi_select": "Selection Item 3",
8
+ "drop_down_item": "Drop Down Item 3",
9
+ "check1": false,
10
+ "check2": true,
11
+ "check3": true,
12
+ "radio_select": 1
13
+ }
14
+ }
15
+ }
Binary file
@@ -0,0 +1,11 @@
1
+ Form_data:
2
+ primary:
3
+ username: "Ignatius von Snicklefritz"
4
+ password: "T0p_Sekrit"
5
+ image_filename: "Wilder.jpg"
6
+ multi_select: "Selection Item 2"
7
+ drop_down_item: "Drop Down Item 5"
8
+ check1: true
9
+ check2: true
10
+ check3: false
11
+ radio_select: 2
@@ -0,0 +1,25 @@
1
+ {
2
+ "Environments": {
3
+ "LOCAL": {
4
+ "PROTOCOL": "file",
5
+ "BASE_URL": "/../../test_site"
6
+ },
7
+ "REMOTE": {
8
+ "PROTOCOL": "http",
9
+ "BASE_URL": "192.168.1.129/test_site"
10
+ }
11
+ },
12
+ "Form_data": {
13
+ "primary": {
14
+ "username": "Thaddeus Eumbwebwe",
15
+ "password": "Pa55w0rd",
16
+ "image_filename": "Granny.jpg",
17
+ "multi_select": "Selection Item 3",
18
+ "drop_down_item": "Drop Down Item 3",
19
+ "check1": false,
20
+ "check2": true,
21
+ "check3": true,
22
+ "radio_select": 1
23
+ }
24
+ }
25
+ }
Binary file
@@ -0,0 +1,20 @@
1
+ # This section is populated with Environment data required to execute automated test suites on all supported environments
2
+ Environments:
3
+ LOCAL:
4
+ PROTOCOL: "file"
5
+ BASE_URL: "/../../test_site"
6
+ REMOTE:
7
+ PROTOCOL: "http"
8
+ BASE_URL: "192.168.1.129/test_site"
9
+
10
+ Form_data:
11
+ primary:
12
+ username: "Xavier Snicklefritz"
13
+ password: "Pa55W0rd"
14
+ image_filename: "Wilder.jpg"
15
+ multi_select: "Selection Item 1"
16
+ drop_down_item: "Drop Down Item 2"
17
+ check1: true
18
+ check2: true
19
+ check3: true
20
+ radio_select: 3
@@ -1,6 +1,6 @@
1
- # To execute this docker-compose yml file use `docker-compose -f docker-compose-v3.yml up`
1
+ # To execute this docker-compose yml file use `docker-compose -f docker-compose.yml up`
2
2
  # Add the `-d` flag at the end for detached execution
3
- # To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3.yml down`
3
+ # To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose.yml down`
4
4
  version: "3"
5
5
  services:
6
6
  chrome:
@@ -0,0 +1,54 @@
1
+ Feature: Basic HTML Form Test Page using CSS locators
2
+ In order to ensure comprehensive support for HTML UI elements and forms
3
+ As a developer of the TestCentricity web gem
4
+ I expect to validate the interaction and verification capabilities of typical HTML form UI elements
5
+
6
+
7
+ Background:
8
+ Given I am on the Basic CSS Form page
9
+
10
+
11
+ Scenario: Validate verify_ui_states method and associated object state verification methods
12
+ Then I expect the Basic CSS Form page to be correctly displayed
13
+
14
+
15
+ @!mobile @!firefox_headless @!firefox_grid
16
+ Scenario: Validate verify_focus_order method
17
+ Then I expect the tab order to be correct
18
+
19
+
20
+ Scenario: Validate populate_data_fields method and associated object action methods
21
+ When I populate the form fields
22
+ Then I expect the form fields to be correctly populated
23
+ When I cancel my changes
24
+ Then I expect the Basic CSS Form page to be correctly displayed
25
+
26
+
27
+ Scenario Outline: Choose selectlist options by index, value, and text
28
+ When I choose selectlist options by <method>
29
+ Then I expect the selected option to be displayed
30
+
31
+ Examples:
32
+ |method |
33
+ |index |
34
+ |text |
35
+
36
+ @!safari @!firefox @!firefox_headless
37
+ Examples:
38
+ |method |
39
+ |value |
40
+
41
+
42
+ Scenario Outline: Verify functionality of navigation tabs and browser back/forward
43
+ When I click the <target_page> navigation tab
44
+ Then I expect the <target_page> page to be correctly displayed
45
+ When I navigate back
46
+ Then I should be on the Basic CSS Form page
47
+ When I navigate forward
48
+ Then I should be on the <target_page> page
49
+
50
+ Examples:
51
+ |target_page |
52
+ |Media Test |
53
+ |Indexed Sections |
54
+ |Custom Controls |
@@ -0,0 +1,26 @@
1
+ @!grid @!mobile @!headless
2
+
3
+
4
+ Feature: Basic HTML Form Test Page using Xpath locators
5
+ In order to ensure comprehensive support for HTML UI elements and forms
6
+ As a developer of the TestCentricity web gem
7
+ I expect to validate the interaction and verification capabilities of typical HTML form UI elements
8
+
9
+
10
+ Background:
11
+ Given I am on the Basic Xpath Form page
12
+
13
+
14
+ Scenario: Validate verify_ui_states method and associated object state verification methods
15
+ Then I expect the Basic Xpath Form page to be correctly displayed
16
+
17
+
18
+ Scenario: Validate verify_focus_order method
19
+ Then I expect the tab order to be correct
20
+
21
+
22
+ Scenario: Validate populate_data_fields method and associated object action methods
23
+ When I populate the form fields
24
+ Then I expect the form fields to be correctly populated
25
+ When I cancel my changes
26
+ Then I expect the Basic Xpath Form page to be correctly displayed
@@ -0,0 +1,29 @@
1
+ Feature: Custom Controls
2
+ In order to ensure comprehensive support for custom UI elements
3
+ As a developer of the TestCentricity web gem
4
+ I expect to validate the interaction and verification capabilities of custom UI elements
5
+
6
+
7
+ Background:
8
+ Given I am on the Custom Controls page
9
+
10
+
11
+ Scenario: Validate populate_data_fields method and associated object action methods
12
+ When I populate the form fields
13
+ Then I expect the form fields to be correctly populated
14
+
15
+
16
+ @!safari @!firefox @!firefox_headless @!ios
17
+ Scenario: Use custom select list input field to choose options
18
+ When I choose custom select options by typing
19
+ Then I expect the form fields to be correctly populated
20
+
21
+
22
+ Scenario Outline: Choose selectlist options by index and text
23
+ When I choose selectlist options by <method>
24
+ Then I expect the selected option to be displayed
25
+
26
+ Examples:
27
+ |method |
28
+ |index |
29
+ |text |