webship-js 1.0.39 → 1.0.41

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.
Files changed (48) hide show
  1. package/assets/config_templates/circleci-linux-chrome.conf.js +10 -1
  2. package/assets/config_templates/github-linux-chrome.conf.js +10 -1
  3. package/examples/test--when--i-scroll-functionality.html +176 -0
  4. package/lib/custom-hooks/before-after.js +30 -0
  5. package/nightwatch.conf.js +12 -3
  6. package/package.json +1 -1
  7. package/tests/features/test--given--i-am-on-homepage.feature +2 -2
  8. package/tests/features/test--then--i-should--not--see-text-in-element.feature +2 -2
  9. package/tests/features/test--then--i-should--see-text-in-element-by-attr.feature +2 -2
  10. package/tests/features/test--then--i-should--see-text-in-element.feature +2 -2
  11. package/tests/features/test--then--i-should--see-text-matching-pattern-in-element.feature +4 -4
  12. package/tests/features/test--then--i-should--see-text-matching-pattern.feature +5 -5
  13. package/tests/features/test--then--i-should-be-on-page.feature +2 -2
  14. package/tests/features/test--then--i-should-be-on-the-homepage.feature +2 -2
  15. package/tests/features/test--then--i-should-not-see-an-element-by-attr.feature +2 -2
  16. package/tests/features/test--then--i-should-not-see-an-element.feature +2 -2
  17. package/tests/features/test--then--i-should-see-an-element-by-attr.feature +2 -2
  18. package/tests/features/test--then--i-should-see-an-element.feature +2 -2
  19. package/tests/features/test--then--the-checkbox-is-checked.feature +2 -2
  20. package/tests/features/test--then--the-checkbox-should-be-checked.feature +2 -2
  21. package/tests/features/test--then--the-element-should-contain-cssproperty.feature +2 -2
  22. package/tests/features/test--then--the-element-should-not-contain-cssproperty.feature +2 -2
  23. package/tests/features/test--then--the-field-should-contain-value.feature +3 -3
  24. package/tests/features/test--then--the-response-should-contain.feature +3 -3
  25. package/tests/features/test--then--the-response-status-code-should-be.feature +2 -2
  26. package/tests/features/test--then--the-url-should-match.feature +3 -3
  27. package/tests/features/test--then-the-link-should-contain-by-attribute.feature +2 -3
  28. package/tests/features/test--then-the-link-should-contain.feature +2 -3
  29. package/tests/features/test--when--i-attach-file-to-feild.feature +3 -5
  30. package/tests/features/test--when--i-check-checkbox.feature +2 -3
  31. package/tests/features/test--when--i-click-link-by-attribute.feature +2 -3
  32. package/tests/features/test--when--i-click-link.feature +2 -3
  33. package/tests/features/test--when--i-fill-in-by-attr.feature +2 -2
  34. package/tests/features/test--when--i-fill-in-table-by-attr.feature +6 -6
  35. package/tests/features/test--when--i-fill-in.feature +4 -4
  36. package/tests/features/test--when--i-go-to-homepage.feature +3 -6
  37. package/tests/features/test--when--i-move-forward-backward-one-page.feature +2 -3
  38. package/tests/features/test--when--i-press-button-by-attribute.feature +2 -3
  39. package/tests/features/test--when--i-press-button.feature +7 -3
  40. package/tests/features/test--when--i-reload-page.feature +2 -3
  41. package/tests/features/test--when--i-scroll.feature +48 -0
  42. package/tests/features/test--when--i-select-option-from-dropdownlist.feature +15 -4
  43. package/tests/features/test--when--i-wait-page-is-loaded.feature +2 -3
  44. package/tests/features/test--when--i-wait-time.feature +3 -4
  45. package/tests/step-definitions/webship.js +543 -233
  46. package/examples/test--when--i-scroll-to-the-bottom.html +0 -49
  47. package/tests/features/test--when--i-scroll-to-the-bottom.feature +0 -9
  48. package/tests/features/test--when--i-select-option-from-dropdownlist-by-attr.feature +0 -16
@@ -19,7 +19,16 @@ module.exports = {
19
19
  parallel: 2,
20
20
  },
21
21
  },
22
-
22
+ globals: {
23
+ assets_folder : "/test/assets/",
24
+ minimum_wait_time: {
25
+ page: 3000,
26
+ before_scenario: 0,
27
+ after_scenario: 0,
28
+ before_step: 0,
29
+ after_step: 1000
30
+ }
31
+ },
23
32
  test_settings: {
24
33
  default: {
25
34
  launch_url: 'http://localhost:8080/',
@@ -30,7 +30,16 @@ module.exports = {
30
30
  },
31
31
 
32
32
  },
33
-
33
+ globals: {
34
+ assets_folder : "/test/assets/",
35
+ minimum_wait_time: {
36
+ page: 3000,
37
+ before_scenario: 0,
38
+ after_scenario: 0,
39
+ before_step: 0,
40
+ after_step: 1000
41
+ }
42
+ },
34
43
  test_settings: {
35
44
  default: {
36
45
  launch_url: 'http://localhost:8080/',
@@ -0,0 +1,176 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+ <meta charset='utf-8'>
6
+ <title>Complete Scroll Functionality Test</title>
7
+ <style>
8
+ body {
9
+ margin: 0;
10
+ padding: 20px;
11
+ font-family: Arial, sans-serif;
12
+ }
13
+
14
+ .container,
15
+ .container input,
16
+ .container button {
17
+ font-size: 26px;
18
+ }
19
+
20
+ .style {
21
+ font-size: 22px;
22
+ line-height: 30px;
23
+ border: 1px solid #ccc;
24
+ padding: 10px;
25
+ margin: 5px 0;
26
+ background-color: #f9f9f9;
27
+ }
28
+
29
+ .indicator {
30
+ font-size: 28px;
31
+ font-weight: bold;
32
+ color: #007bff;
33
+ padding: 15px;
34
+ margin: 10px 0;
35
+ border: 2px solid #007bff;
36
+ background-color: #e7f3ff;
37
+ display: none;
38
+ }
39
+
40
+ #scrollable-container {
41
+ height: 300px;
42
+ overflow-y: auto;
43
+ border: 2px solid #333;
44
+ margin: 20px 0;
45
+ padding: 10px;
46
+ background-color: #f0f0f0;
47
+ }
48
+
49
+ .scrollable-content {
50
+ height: 800px;
51
+ background: linear-gradient(to bottom, #ff9999, #99ff99, #9999ff);
52
+ padding: 20px;
53
+ position: relative;
54
+ }
55
+
56
+ .scroll-marker {
57
+ position: absolute;
58
+ font-size: 18px;
59
+ font-weight: bold;
60
+ background-color: rgba(255, 255, 255, 0.8);
61
+ padding: 5px 10px;
62
+ border-radius: 5px;
63
+ }
64
+
65
+ .scroll-marker.top {
66
+ top: 10px;
67
+ left: 10px;
68
+ }
69
+
70
+ .scroll-marker.bottom {
71
+ bottom: 10px;
72
+ right: 10px;
73
+ }
74
+
75
+ #complete {
76
+ font-size: 32px;
77
+ line-height: 40px;
78
+ color: #28a745;
79
+ font-weight: bold;
80
+ text-align: center;
81
+ padding: 20px;
82
+ border: 3px solid #28a745;
83
+ background-color: #d4edda;
84
+ margin: 20px 0;
85
+ }
86
+
87
+ </style>
88
+ </head>
89
+
90
+ <body>
91
+ <h1>Complete Scrolling Functionality Test Page</h1>
92
+
93
+ <!-- Indicators for different scroll actions -->
94
+ <div id="basic-scroll-down" class="indicator">Basic scroll down works</div>
95
+ <div id="basic-scroll-up" class="indicator">Basic scroll up works</div>
96
+ <div id="custom-scroll-down" class="indicator">Custom scroll down works</div>
97
+ <div id="custom-scroll-up" class="indicator">Custom scroll up works</div>
98
+ <div id="scroll-to-top" class="indicator">Scroll to top works</div>
99
+
100
+ <!-- Main content container -->
101
+ <div id="container">
102
+ <p class="style">This is the starting content of the page</p>
103
+ </div>
104
+
105
+ <!-- Scrollable element container -->
106
+ <h2>Scrollable Container Test</h2>
107
+ <div id="scrollable-container">
108
+ <div class="scrollable-content">
109
+ <div class="scroll-marker top">Element scroll to top works</div>
110
+ <p>This is a scrollable container with a lot of content inside.</p>
111
+ <p>You can scroll within this container independently of the main page.</p>
112
+ <p>This content demonstrates element-specific scrolling functionality.</p>
113
+ <div class="scroll-marker bottom">Element scroll to bottom works</div>
114
+ </div>
115
+ </div>
116
+
117
+ <!-- Bottom completion message -->
118
+ <div id="complete">Scroll to bottom works</div>
119
+
120
+ </body>
121
+
122
+ <script>
123
+ // Generate content to make the page long enough for scrolling
124
+ const container = document.getElementById("container");
125
+
126
+ for(var i = 1; i <= 30; i++){
127
+ container.innerHTML += '<p class="style">Container content section #' + i + ' - This adds height to test scrolling</p>';
128
+ }
129
+
130
+ // Add scroll event listeners to show appropriate indicators
131
+ let scrollTimeout;
132
+
133
+ window.addEventListener('scroll', function() {
134
+ clearTimeout(scrollTimeout);
135
+ scrollTimeout = setTimeout(function() {
136
+ const scrollY = window.scrollY;
137
+ const windowHeight = window.innerHeight;
138
+ const documentHeight = document.documentElement.scrollHeight;
139
+
140
+ // Hide all indicators first
141
+ document.querySelectorAll('.indicator').forEach(el => el.style.display = 'none');
142
+
143
+ // Show appropriate indicator based on scroll position
144
+ if (scrollY === 0) {
145
+ document.getElementById('scroll-to-top').style.display = 'block';
146
+ } else if (scrollY >= 300 && scrollY <= 400) {
147
+ document.getElementById('basic-scroll-down').style.display = 'block';
148
+ } else if (scrollY >= 450 && scrollY <= 550) {
149
+ document.getElementById('custom-scroll-down').style.display = 'block';
150
+ } else if (scrollY + windowHeight >= documentHeight - 50) {
151
+ // Near bottom of page
152
+ if (window.lastScrollDirection === 'up') {
153
+ document.getElementById('custom-scroll-up').style.display = 'block';
154
+ }
155
+ }
156
+
157
+ // Track scroll direction
158
+ if (scrollY > (window.lastScrollY || 0)) {
159
+ window.lastScrollDirection = 'down';
160
+ } else {
161
+ window.lastScrollDirection = 'up';
162
+ }
163
+ window.lastScrollY = scrollY;
164
+
165
+ }, 100);
166
+ });
167
+
168
+ // Add scroll event listener for the scrollable container
169
+ const scrollableContainer = document.getElementById('scrollable-container');
170
+ scrollableContainer.addEventListener('scroll', function() {
171
+ // This helps test element-specific scrolling
172
+ console.log('Scrollable container scrolled to:', this.scrollTop);
173
+ });
174
+
175
+ </script>
176
+ </html>
@@ -0,0 +1,30 @@
1
+ const {Before, After, BeforeStep, AfterStep} = require('@cucumber/cucumber');
2
+
3
+ /**
4
+ * Safely pauses based on global config.
5
+ * Handles case where browser or globals may be undefined.
6
+ * @param {string} key
7
+ */
8
+ function safePause(key) {
9
+ const time = (global.browser?.globals?.minimum_wait_time?.[key]) || 0;
10
+ if (time > 0 && global.browser?.pause) {
11
+ global.browser.pause(time);
12
+ }
13
+ }
14
+
15
+ // Register hooks
16
+ Before(function () {
17
+ safePause('before_scenario');
18
+ });
19
+
20
+ After(function () {
21
+ safePause('after_scenario');
22
+ });
23
+
24
+ BeforeStep(function () {
25
+ safePause('before_step');
26
+ });
27
+
28
+ AfterStep(function () {
29
+ safePause('after_step');
30
+ });
@@ -4,7 +4,7 @@ require('events').EventEmitter.defaultMaxListeners = 1000;
4
4
  module.exports = {
5
5
  // An array of folders (excluding subfolders) where your tests are located;
6
6
  // if this is not specified, the test source must be passed as the second argument to the test runner.
7
- src_folders: ['tests/step-definitions'],
7
+ src_folders: ['./tests/step-definitions'],
8
8
 
9
9
  // See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-commands.html
10
10
  custom_commands_path: './lib/custom-commands',
@@ -15,12 +15,21 @@ module.exports = {
15
15
  test_runner: {
16
16
  type: 'cucumber',
17
17
  options: {
18
- feature_path: 'tests/features/*.feature',
18
+ feature_path: './tests/features/*.feature',
19
19
  additional_config: '',
20
20
  parallel: 1,
21
21
  },
22
22
  },
23
-
23
+ globals: {
24
+ assets_folder : "/test/assets/",
25
+ min_wait_time: {
26
+ page : 3000,
27
+ before_scenario : 0,
28
+ after_scenario : 0,
29
+ before_step : 0,
30
+ after_step : 1000
31
+ }
32
+ },
24
33
  test_settings: {
25
34
  default: {
26
35
  launch_url: 'http://localhost:8080',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webship-js",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "description": "Webship JS automated functional testing.",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -1,6 +1,6 @@
1
1
  Feature: An example of testing for being on the homepage.
2
- As an anonymous user,
3
- I want to be able to navigate to the homepage
2
+ As an anonymous user,
3
+ I want to be able to navigate to the homepage
4
4
  so that I can check the welcome message on the homepage.
5
5
 
6
6
  Scenario: Ensure that you are on the homepage by using 'the' before the word 'homepage'.
@@ -1,6 +1,6 @@
1
1
  Feature: An example to ensure that the input text does not contain a specific value based on its attribute
2
- As a tester,
3
- I want to ensure that the textbox does not contain a specific value based on its attributes.
2
+ As a tester,
3
+ I want to ensure that the textbox does not contain a specific value based on its attributes.
4
4
 
5
5
  Scenario: Ensuring that a textbox does not contain a specific value based on its attributes.
6
6
  Given I am on "/test--then--i-should--not--see-text-in-element.html"
@@ -1,6 +1,6 @@
1
1
  Feature: An example to ensure that the input text contain a specific value based on its attribute
2
- As a tester,
3
- I want to ensure that the textbox contain a specific value based on its attributes.
2
+ As a tester,
3
+ I want to ensure that the textbox contain a specific value based on its attributes.
4
4
 
5
5
  Scenario: Ensuring that a textbox contain a specific value based on its attributes.
6
6
  Given I am on "/test--then--i-should--not--see-text-in-element.html"
@@ -1,6 +1,6 @@
1
1
  Feature: An example to ensure that the input text contain a specific value based on its label
2
- As a tester,
3
- I want to ensure thlabelat the textbox does not contain a specific value based on its label
2
+ As a tester,
3
+ I want to ensure thlabelat the textbox does not contain a specific value based on its label
4
4
 
5
5
  Scenario: Ensuring that a textbox does not contain a specific value based on its label.
6
6
  Given I am on "/test--then--i-should--not--see-text-in-element.html"
@@ -1,13 +1,13 @@
1
1
  Feature: An example of ensuring that a pattern matches the text in a specific element
2
- As a developer,
3
- I want to ensure that a pattern matches the text in a specific element.
2
+ As a developer,
3
+ I want to ensure that a pattern matches the text in a specific element.
4
4
 
5
- Scenario: Ensuring that the text in an element matches the 12-hour time format pattern
5
+ Scenario: Ensuring that the text in an element matches the 12-hour time format pattern
6
6
  Given I am on "/test--then--i-should--see-text-matching-pattern.html"
7
7
  And I wait max of 3 seconds
8
8
  Then I should see text matching "(((0[1-9])|(1[0-2])):([0-5])(0|5)\s(A|P|a|p)(M|m))" in the ".time" element
9
9
 
10
- Scenario: Ensuring that the text in an element matches the DD/MM/YYYY or DD-MM-YYYY date format pattern
10
+ Scenario: Ensuring that the text in an element matches the DD/MM/YYYY or DD-MM-YYYY date format pattern
11
11
  Given I am on "/test--then--i-should--see-text-matching-pattern.html"
12
12
  And I wait max of 3 seconds
13
13
  Then I should see text matching "(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}" in the "#date" element
@@ -1,18 +1,18 @@
1
1
  Feature: An example of ensuring that a pattern matches the text on a specific page.
2
- As a developer,
3
- I want to ensure that a pattern matches the text in a specific page.
2
+ As a developer,
3
+ I want to ensure that a pattern matches the text in a specific page.
4
4
 
5
- Scenario: Ensure that there is a text matching the pattern of text starting with 'T' on a specific page
5
+ Scenario: Ensure that there is a text matching the pattern of text starting with 'T' on a specific page
6
6
  Given I am on "/test--then--i-should--see-text-matching-pattern.html"
7
7
  And I wait max of 3 seconds
8
8
  Then I should see text matching "^T\w+"
9
9
 
10
- Scenario: Ensure that there is no text matching the pattern of text starting with 'O' on a specific page
10
+ Scenario: Ensure that there is no text matching the pattern of text starting with 'O' on a specific page
11
11
  Given I am on "/test--then--i-should--see-text-matching-pattern.html"
12
12
  And I wait max of 3 seconds
13
13
  Then I should not see text matching "^O\w+"
14
14
 
15
- Scenario: Ensure that there is text matching the email pattern on a specific page
15
+ Scenario: Ensure that there is text matching the email pattern on a specific page
16
16
  Given I am on "/test--then--i-should--see-text-matching-pattern.html"
17
17
  And I wait max of 3 seconds
18
18
  Then I should see text matching "[a-z0-9]+@[a-z]+\.[a-z]{2,3}"
@@ -1,6 +1,6 @@
1
1
  Feature: An example to ensure that you are on a specific page
2
- As an anonymous user,
3
- I want to ensure that I am on a specific page
2
+ As an anonymous user,
3
+ I want to ensure that I am on a specific page
4
4
 
5
5
  Scenario: Ensure that you are on a specific page
6
6
  Given I am on the homepage
@@ -1,6 +1,6 @@
1
1
  Feature: An example to ensure that you are on the homepage
2
- As an anonymous user,
3
- I want to ensure that I am on the homepage
2
+ As an anonymous user,
3
+ I want to ensure that I am on the homepage
4
4
 
5
5
  Scenario: Ensure that you are on the homepage
6
6
  Given I am on the homepage
@@ -1,6 +1,6 @@
1
1
  Feature: An example to ensure that a specific element is not visible on the current page by its attribute
2
- As a user,
3
- I want to ensure that when I'm on a particular page, I do not see a specific element identified by its attribute
2
+ As a user,
3
+ I want to ensure that when I'm on a particular page, I do not see a specific element identified by its attribute
4
4
 
5
5
  Scenario: Ensure that a specific element is not visible based on its attribute
6
6
  Given I am on "/test--then--i-should--see-text-in-element.html"
@@ -1,6 +1,6 @@
1
1
  Feature: An example to ensure that a specific element is not visible on the current page by its label
2
- As a user,
3
- I want to ensure that when I'm on a particular page, I do not see a specific element by its label
2
+ As a user,
3
+ I want to ensure that when I'm on a particular page, I do not see a specific element by its label
4
4
 
5
5
  Scenario: Ensure to test that a specific element is not visible by its label
6
6
  Given I am on "/test--then--i-should--see-text-in-element.html"
@@ -1,6 +1,6 @@
1
1
  Feature: An example to ensure visibility of a specific element on the current page by its attributes
2
- As a user,
3
- I want to make sure that when I'm on a particular page, I can see a specific element by its attributes
2
+ As a user,
3
+ I want to make sure that when I'm on a particular page, I can see a specific element by its attributes
4
4
 
5
5
  Scenario: Ensure visibility of a specific element by its attributes
6
6
  Given I am on "/test--then--i-should--see-text-in-element.html"
@@ -1,6 +1,6 @@
1
1
  Feature: An example to ensure that a specific element is visible on the current page by its label
2
- As a user,
3
- I want to ensure that when I'm on a particular page, I can see a specific element by its label
2
+ As a user,
3
+ I want to ensure that when I'm on a particular page, I can see a specific element by its label
4
4
 
5
5
  Scenario: Check to test seeing for a specific element by its label
6
6
  Given I am on "/test--then--i-should--see-text-in-element.html"
@@ -1,6 +1,6 @@
1
1
  Feature: An example of a test case for selecting a checkbox
2
- As a tester,
3
- I want to be able to check that the checkbox is checked or not
2
+ As a tester,
3
+ I want to be able to check that the checkbox is checked or not
4
4
 
5
5
  Scenario: Verify that the checkbox is checked
6
6
  Given I am on "/test--then--the-checkbox-checked.html"
@@ -1,6 +1,6 @@
1
1
  Feature: An example to assert the selection of a checkbox
2
- As an anonymous user,
3
- I want to ensure that a specific checkbox is checked before submitting a particular action
2
+ As an anonymous user,
3
+ I want to ensure that a specific checkbox is checked before submitting a particular action
4
4
 
5
5
  Scenario: Ensure that the checkbox is checked
6
6
  Given I am on "/test--then--the-checkbox-checked.html"
@@ -1,6 +1,6 @@
1
1
  Feature: An example to verify whether the element contains a specific expected CSS property.
2
- As a developer,
3
- I want to verify whether the element contains a specific expected CSS property.
2
+ As a developer,
3
+ I want to verify whether the element contains a specific expected CSS property.
4
4
 
5
5
  Scenario: Verify whether the element contains a specific expected CSS property
6
6
  Given I am on "/test--then--the-element-should_not-contain-cssproperty.html"
@@ -1,6 +1,6 @@
1
1
  Feature: An example to verify whether the element does not contain a specific expected CSS property.
2
- As a developer,
3
- I want to verify whether the element does not contain a specific expected CSS property.
2
+ As a developer,
3
+ I want to verify whether the element does not contain a specific expected CSS property.
4
4
 
5
5
  Scenario: Verify whether the element does not contain a certain CSS property
6
6
  Given I am on "/test--then--the-element-should_not-contain-cssproperty.html"
@@ -1,11 +1,11 @@
1
1
  Feature: An example to verify whether the field contains a specific value identified by its element label
2
- As a tester,
3
- I want to verify whether the field has a specific value based on its element label
2
+ As a tester,
3
+ I want to verify whether the field has a specific value based on its element label
4
4
 
5
5
  Scenario: Verify that the field has a particular value based on its element label
6
6
  Given I am on "/test--then--i-should--not--see-text-in-element.html"
7
7
  And I fill in "Username" with "user1"
8
- Then the "Username" field should contain "user1"
8
+ Then the "Username" field should contain "user1"
9
9
  When I press "Reset" by attr
10
10
  And I fill in "Username" with "user2"
11
11
  Then the "Username" field should contain "user2"
@@ -1,6 +1,6 @@
1
- Feature: An example to ensure that the response page contains specific text
2
- As a tester,
3
- I want to navigate to a page to verify whether it contains specific text
1
+ Feature: An example to ensure that the response page contains specific text
2
+ As a tester,
3
+ I want to navigate to a page to verify whether it contains specific text
4
4
 
5
5
  Scenario: Ensure that the response page contains specific text
6
6
  Given I am on the homepage
@@ -1,6 +1,6 @@
1
1
  Feature: An example to check the status code of a page response
2
- As a tester,
3
- I want to be able to check the status code of a page response
2
+ As a tester,
3
+ I want to be able to check the status code of a page response
4
4
 
5
5
  Scenario: Check the response status code for a non-existing page
6
6
  Given I am on the homepage
@@ -1,7 +1,7 @@
1
1
  Feature: An example of checking for matching URLs based on a specific pattern
2
- As a tester,
3
- I want to ensure that the current page path matches a specific pattern
2
+ As a tester,
3
+ I want to ensure that the current page path matches a specific pattern
4
4
 
5
- Scenario: Ensure that the current page path matches the URL pattern that uses dashes between words
5
+ Scenario: Ensure that the current page path matches the URL pattern that uses dashes between words
6
6
  Given I am on "/test-acceptable-url-path.html"
7
7
  Then the url should match "(https?:\/\/)?([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.[a-zA-Z]{2,}(:\d+)?(\/[^?#\s_]+)?(\?[^#\s_]+)?(#.*)?"
@@ -1,7 +1,6 @@
1
1
  Feature: An example of checking the href attribute of a link element to see if it contains a specific URL, which is found by its attributes.
2
-
3
- As a tester,
4
- I want to be able to check link href if contain a specific URL found by its attributes
2
+ As a tester,
3
+ I want to be able to check link href if contain a specific URL found by its attributes
5
4
 
6
5
  Scenario: Verify that the link contains "about" by its direct id, class attribute
7
6
  Given I am on "/test--then--the-link-should-contain.html"
@@ -1,7 +1,6 @@
1
1
  Feature: An example of checking the href attribute of a link element to see if it contains a specific text.
2
-
3
- As a tester,
4
- I want to be able to check link href if contain a specific text
2
+ As a tester,
3
+ I want to be able to check link href if contain a specific text
5
4
 
6
5
  Scenario: Verify that the link contains "about"
7
6
  Given I am on "/test--then--the-link-should-contain.html"
@@ -1,11 +1,9 @@
1
1
  Feature: An example of checking the attachment of a file to a field
2
-
3
- As a tester,
4
- I want to be able to attach a file (e.g., images) to a field
2
+ As a tester,
3
+ I want to be able to attach a file (e.g., images) to a field
5
4
 
6
5
  Scenario: Checking the attachment of an image to a field
7
6
  Given I am on "/test--when--i-attach-file-to-feild.html"
8
7
  When I attach the file "webshipco.png" to "#fileUpload"
9
8
  And I press "Submit" by attr
10
- And I wait 2 second
11
- Then I should see "webshipco.png"
9
+ And I wait 2 second
@@ -1,7 +1,6 @@
1
1
  Feature: An example of checking and unchecking a checkbox
2
-
3
- As a tester,
4
- I want to be able to check and uncheck a checkbox
2
+ As a tester,
3
+ I want to be able to check and uncheck a checkbox
5
4
 
6
5
  Scenario: Implementing the ability to check and uncheck a checkbox
7
6
  Given I am on "/test--when--i-check-uncheck-checkbox.html"
@@ -1,7 +1,6 @@
1
1
  Feature: An example of clicking a link by its attribute
2
-
3
- As a tester,
4
- I want to be able to click a link by its attribute
2
+ As a tester,
3
+ I want to be able to click a link by its attribute
5
4
 
6
5
  Scenario: Verify the action of clicking a link by targeting its ID attribute
7
6
  Given I am on "/test--when--i-click-link.html"
@@ -1,7 +1,6 @@
1
1
  Feature: An example of clicking a link by its text
2
-
3
- As a tester,
4
- I want to be able to click a link based on its text
2
+ As a tester,
3
+ I want to be able to click a link based on its text
5
4
 
6
5
  Scenario: Verify clicking a link by its text
7
6
  Given I am on "/test--when--i-click-link.html"
@@ -1,6 +1,6 @@
1
1
  Feature: An example of filling an input textbox with a value using its attributes.
2
- As a tester,
3
- I want to fill an input field with a value using its attributes.
2
+ As a tester,
3
+ I want to fill an input field with a value using its attributes.
4
4
 
5
5
  Scenario: Fill in the input field using its ID and class attributes.
6
6
  Given I am on "/test--when--i-fill-in.html"
@@ -1,19 +1,19 @@
1
1
  Feature: An example of populating a table of input fields with values using their attributes.
2
- As a tester,
3
- I want to be able to fill input text fields with values using their attributes.
2
+ As a tester,
3
+ I want to be able to fill input text fields with values using their attributes.
4
4
 
5
5
  Scenario: Check the filling of a table of input fields using different attributes.
6
6
  Given I am on "/test--when--i-fill-in.html"
7
7
  When I fill in the following: by attr
8
- | #uname | John Smith |
9
- | pwordcss | 1234 |
8
+ | #uname | John Smith |
9
+ | pwordcss | 1234 |
10
10
  When I press "Login"
11
11
  Then I should see "You enter Username: John Smith and Password: 1234"
12
12
 
13
13
  Scenario: Check the filling of a table of input fields using the placeholder attribute.
14
14
  Given I am on "/test--when--i-fill-in.html"
15
15
  When I fill in the following: by its "placeholder" attribute
16
- | Your full name | John Smith |
17
- | Your Password | 1234 |
16
+ | Your full name | John Smith |
17
+ | Your Password | 1234 |
18
18
  When I press "Login"
19
19
  Then I should see "You enter Username: John Smith and Password: 1234"