@vardot/varbase-e2e 2.0.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.
Files changed (301) hide show
  1. package/AGENTS.md +148 -0
  2. package/CLAUDE.md +544 -0
  3. package/README.md +22 -0
  4. package/bin/generate-reports.js +363 -0
  5. package/bin/init-varbase-e2e.js +330 -0
  6. package/bin/postinstall.js +26 -0
  7. package/cucumber.js +125 -0
  8. package/docs/00-quick-start.md +102 -0
  9. package/docs/01-getting-started.md +102 -0
  10. package/docs/02-bbr-smart-waits.md +77 -0
  11. package/docs/03-selector-registry.md +95 -0
  12. package/docs/04-step-reference.md +801 -0
  13. package/docs/05-web-first-assertions.md +91 -0
  14. package/docs/06-network-and-dialogs.md +83 -0
  15. package/docs/07-auth-state.md +75 -0
  16. package/docs/08-clock-mocking.md +59 -0
  17. package/docs/09-api-testing.md +114 -0
  18. package/docs/10-accessibility.md +167 -0
  19. package/docs/11-debugging.md +129 -0
  20. package/docs/12-ai-agent-guide.md +338 -0
  21. package/docs/13-faq.md +236 -0
  22. package/docs/14-recipes-cookbook.md +255 -0
  23. package/docs/15-tag-conventions.md +76 -0
  24. package/docs/16-ci-cd.md +90 -0
  25. package/docs/README.md +125 -0
  26. package/docs/advanced-screenshots/then-i-save-fullscreen-screenshot.md +36 -0
  27. package/docs/advanced-screenshots/then-i-save-width-x-height-screenshot.md +34 -0
  28. package/docs/advanced-screenshots/when-i-save-screenshot-name-filename.md +45 -0
  29. package/docs/advanced-screenshots.md +52 -0
  30. package/docs/advanced-selectors.md +18 -0
  31. package/docs/api-step-definitions.md +45 -0
  32. package/docs/global-settings.md +267 -0
  33. package/docs/install-varbase-e2e/ddev-varbase-e2e.md +52 -0
  34. package/docs/install-varbase-e2e.md +34 -0
  35. package/docs/overview.md +40 -0
  36. package/docs/step-definitions/given-i-am-anonymous-user.md +67 -0
  37. package/docs/step-definitions/given-i-am-homepage.md +68 -0
  38. package/docs/step-definitions/given-i-am-specific-page.md +72 -0
  39. package/docs/step-definitions/then-i-should-be.md +56 -0
  40. package/docs/step-definitions/then-i-should-see.md +62 -0
  41. package/docs/step-definitions/then-item-checkbox.md +54 -0
  42. package/docs/step-definitions/then-item-link-should-contain-url.md +84 -0
  43. package/docs/step-definitions/then-item-should-contain.md +67 -0
  44. package/docs/step-definitions/then-radio-button-value-should-be-selected.md +68 -0
  45. package/docs/step-definitions/then-response-status-code-should-be-number.md +69 -0
  46. package/docs/step-definitions/then-value-radio-button-selected.md +62 -0
  47. package/docs/step-definitions/when-i-attach-file-file-name-element.md +71 -0
  48. package/docs/step-definitions/when-i-check-checkbox.md +60 -0
  49. package/docs/step-definitions/when-i-click-link.md +51 -0
  50. package/docs/step-definitions/when-i-click-operation-text-row.md +71 -0
  51. package/docs/step-definitions/when-i-fill.md +59 -0
  52. package/docs/step-definitions/when-i-go-homepage.md +60 -0
  53. package/docs/step-definitions/when-i-go-specific-page.md +67 -0
  54. package/docs/step-definitions/when-i-move-backward-one-page.md +49 -0
  55. package/docs/step-definitions/when-i-move-forward-one-page.md +58 -0
  56. package/docs/step-definitions/when-i-press-button.md +58 -0
  57. package/docs/step-definitions/when-i-reload-page.md +51 -0
  58. package/docs/step-definitions/when-i-scroll.md +73 -0
  59. package/docs/step-definitions/when-i-select-option-select-list.md +53 -0
  60. package/docs/step-definitions/when-i-select-radio-button-value.md +62 -0
  61. package/docs/step-definitions/when-i-uncheck-checkbox.md +57 -0
  62. package/docs/step-definitions/when-i-wait-ajax-finish.md +64 -0
  63. package/docs/step-definitions/when-i-wait.md +62 -0
  64. package/docs/step-definitions.md +82 -0
  65. package/docs/steps/README.md +137 -0
  66. package/docs/steps/a11y.md +731 -0
  67. package/docs/steps/action.md +181 -0
  68. package/docs/steps/api.md +679 -0
  69. package/docs/steps/assertion.md +328 -0
  70. package/docs/steps/auth.md +108 -0
  71. package/docs/steps/clock.md +171 -0
  72. package/docs/steps/cookie.md +293 -0
  73. package/docs/steps/debug.md +52 -0
  74. package/docs/steps/dialog.md +226 -0
  75. package/docs/steps/drupal-canvas.md +414 -0
  76. package/docs/steps/drupal-ckeditor.md +118 -0
  77. package/docs/steps/drupal-core.md +688 -0
  78. package/docs/steps/drupal-layout-builder.md +437 -0
  79. package/docs/steps/drupal-media.md +107 -0
  80. package/docs/steps/drupal-moderation.md +81 -0
  81. package/docs/steps/drupal-paragraphs.md +36 -0
  82. package/docs/steps/element.md +455 -0
  83. package/docs/steps/field.md +648 -0
  84. package/docs/steps/file-download.md +235 -0
  85. package/docs/steps/form.md +344 -0
  86. package/docs/steps/iframe.md +248 -0
  87. package/docs/steps/input.md +220 -0
  88. package/docs/steps/javascript.md +111 -0
  89. package/docs/steps/keyboard.md +107 -0
  90. package/docs/steps/link.md +217 -0
  91. package/docs/steps/metatag.md +99 -0
  92. package/docs/steps/modal.md +232 -0
  93. package/docs/steps/navigation.md +275 -0
  94. package/docs/steps/network.md +284 -0
  95. package/docs/steps/path.md +203 -0
  96. package/docs/steps/response.md +102 -0
  97. package/docs/steps/responsive.md +139 -0
  98. package/docs/steps/rest.md +140 -0
  99. package/docs/steps/screenshot.md +211 -0
  100. package/docs/steps/scroll.md +266 -0
  101. package/docs/steps/selectors.md +848 -0
  102. package/docs/steps/storage.md +254 -0
  103. package/docs/steps/table.md +216 -0
  104. package/docs/steps/varbase.md +391 -0
  105. package/docs/steps/video.md +111 -0
  106. package/docs/steps/wait.md +553 -0
  107. package/docs/steps/web-first.md +289 -0
  108. package/docs/steps/xml.md +505 -0
  109. package/docs/steps/yaml.md +951 -0
  110. package/examples/a11y.html +31 -0
  111. package/examples/about-us.html +11 -0
  112. package/examples/account.html +32 -0
  113. package/examples/ajax-wait-examples.html +147 -0
  114. package/examples/contact-us.html +10 -0
  115. package/examples/cookies.html +10 -0
  116. package/examples/date.html +12 -0
  117. package/examples/dynamic-examples.html +498 -0
  118. package/examples/element.html +11 -0
  119. package/examples/example-api.json +28 -0
  120. package/examples/existing-page.html +11 -0
  121. package/examples/field.html +24 -0
  122. package/examples/index.html +37 -0
  123. package/examples/keyboard.html +11 -0
  124. package/examples/links.html +9 -0
  125. package/examples/modal.html +14 -0
  126. package/examples/path.html +3 -0
  127. package/examples/table.html +13 -0
  128. package/examples/test--modal-dialogs.html +252 -0
  129. package/examples/test--then--i-should--not--see-text-in-element.html +48 -0
  130. package/examples/test--then--i-should--see-text-in-element.html +48 -0
  131. package/examples/test--then--i-should--see-text-matching-pattern.html +31 -0
  132. package/examples/test--then--i-should-see-text-in-table-row.html +232 -0
  133. package/examples/test--then--the-checkbox-checked.html +68 -0
  134. package/examples/test--then--the-element-should_not-contain-cssproperty.html +47 -0
  135. package/examples/test--then--the-link-should-contain.html +21 -0
  136. package/examples/test--when--i-additionally-select.html +27 -0
  137. package/examples/test--when--i-attach-file-to-feild.html +50 -0
  138. package/examples/test--when--i-check-uncheck-checkbox.html +47 -0
  139. package/examples/test--when--i-click-link.html +18 -0
  140. package/examples/test--when--i-click-text-in-table-row.html +178 -0
  141. package/examples/test--when--i-fill-in.html +48 -0
  142. package/examples/test--when--i-press-button.html +31 -0
  143. package/examples/test--when--i-reload-page.html +27 -0
  144. package/examples/test--when--i-scroll-functionality.html +177 -0
  145. package/examples/test--when--i-scroll-left-right-functionality.html +149 -0
  146. package/examples/test--when--i-select-option-from-dropdownlist.html +35 -0
  147. package/examples/test--when--i-select-radio-button.html +95 -0
  148. package/examples/test--when-i-wait-max-of-time.html +39 -0
  149. package/examples/test--when-i-wait-page-until-is-loaded.html +47 -0
  150. package/examples/test--when-i-wait-specific-time.html +39 -0
  151. package/examples/test-acceptable-url-path.html +11 -0
  152. package/examples/video-demo.html +43 -0
  153. package/package.json +56 -0
  154. package/playwright.config.ts +39 -0
  155. package/tests/assets/test-document.pdf +14 -0
  156. package/tests/assets/vardot.png +0 -0
  157. package/tests/features/a11y.feature +39 -0
  158. package/tests/features/ajax-wait-examples.feature +24 -0
  159. package/tests/features/api-step-definitions-individual.feature +185 -0
  160. package/tests/features/complete-api-testing-examples.feature +205 -0
  161. package/tests/features/cookie.feature +13 -0
  162. package/tests/features/date.feature +11 -0
  163. package/tests/features/dynamic-content-examples.feature +156 -0
  164. package/tests/features/element.feature +16 -0
  165. package/tests/features/field.feature +25 -0
  166. package/tests/features/keyboard.feature +10 -0
  167. package/tests/features/link.feature +11 -0
  168. package/tests/features/modal-advanced-example.feature +54 -0
  169. package/tests/features/modal-basic-example.feature +42 -0
  170. package/tests/features/modal-error-handling-example.feature +37 -0
  171. package/tests/features/modal.feature +11 -0
  172. package/tests/features/path.feature +16 -0
  173. package/tests/features/response.feature +8 -0
  174. package/tests/features/responsive.feature +10 -0
  175. package/tests/features/table.feature +18 -0
  176. package/tests/features/test--given--i-am-an-anonymous-user.feature +10 -0
  177. package/tests/features/test--given--i-am-on-homepage.feature +16 -0
  178. package/tests/features/test--then--i-save-screenshot.feature +33 -0
  179. package/tests/features/test--then--i-see-locator.feature +320 -0
  180. package/tests/features/test--then--i-should--not--see-text-in-element.feature +13 -0
  181. package/tests/features/test--then--i-should--see-text-in-element-by-attr.feature +10 -0
  182. package/tests/features/test--then--i-should--see-text-in-element.feature +10 -0
  183. package/tests/features/test--then--i-should--see-text-matching-pattern-in-element.feature +13 -0
  184. package/tests/features/test--then--i-should--see-text-matching-pattern.feature +18 -0
  185. package/tests/features/test--then--i-should-be-on-page.feature +10 -0
  186. package/tests/features/test--then--i-should-be-on-the-homepage.feature +10 -0
  187. package/tests/features/test--then--i-should-not-see-an-element-by-attr.feature +8 -0
  188. package/tests/features/test--then--i-should-not-see-an-element.feature +8 -0
  189. package/tests/features/test--then--i-should-see-an-element-by-attr.feature +8 -0
  190. package/tests/features/test--then--i-should-see-an-element.feature +8 -0
  191. package/tests/features/test--then--i-should-see-n-elements.feature +24 -0
  192. package/tests/features/test--then--i-should-see-text-in-table-row.feature +96 -0
  193. package/tests/features/test--then--print-current-url-and-response.feature +21 -0
  194. package/tests/features/test--then--the-checkbox-is-checked.feature +18 -0
  195. package/tests/features/test--then--the-checkbox-should-be-checked.feature +16 -0
  196. package/tests/features/test--then--the-element-should-contain-cssproperty.feature +9 -0
  197. package/tests/features/test--then--the-element-should-not-contain-cssproperty.feature +10 -0
  198. package/tests/features/test--then--the-field-should-contain-value.feature +11 -0
  199. package/tests/features/test--then--the-response-should-contain.feature +11 -0
  200. package/tests/features/test--then--the-response-status-code-should-be.feature +31 -0
  201. package/tests/features/test--then--the-url-should-match.feature +7 -0
  202. package/tests/features/test--then-the-link-should-contain-by-attribute.feature +18 -0
  203. package/tests/features/test--then-the-link-should-contain.feature +7 -0
  204. package/tests/features/test--when--i-additionally-select.feature +30 -0
  205. package/tests/features/test--when--i-attach-file-to-feild.feature +9 -0
  206. package/tests/features/test--when--i-check-checkbox.feature +21 -0
  207. package/tests/features/test--when--i-click-link-by-attribute.feature +21 -0
  208. package/tests/features/test--when--i-click-link.feature +9 -0
  209. package/tests/features/test--when--i-click-text-in-table-row.feature +37 -0
  210. package/tests/features/test--when--i-fill-in-by-attr.feature +31 -0
  211. package/tests/features/test--when--i-fill-in-table-by-attr.feature +19 -0
  212. package/tests/features/test--when--i-fill-in.feature +32 -0
  213. package/tests/features/test--when--i-follow.feature +22 -0
  214. package/tests/features/test--when--i-go-to-homepage.feature +9 -0
  215. package/tests/features/test--when--i-move-forward-backward-one-page.feature +14 -0
  216. package/tests/features/test--when--i-press-button-by-attribute.feature +18 -0
  217. package/tests/features/test--when--i-press-button.feature +13 -0
  218. package/tests/features/test--when--i-reload-page.feature +11 -0
  219. package/tests/features/test--when--i-scroll-left-right.feature +48 -0
  220. package/tests/features/test--when--i-scroll.feature +48 -0
  221. package/tests/features/test--when--i-select-option-from-dropdownlist.feature +21 -0
  222. package/tests/features/test--when--i-select-radio-button.feature +37 -0
  223. package/tests/features/test--when--i-wait-page-is-loaded.feature +8 -0
  224. package/tests/features/test--when--i-wait-time.feature +21 -0
  225. package/tests/features/video.feature +18 -0
  226. package/tests/features/wait.feature +7 -0
  227. package/tests/features/yaml.feature +102 -0
  228. package/tests/selectors/_canonical-keys.json +113 -0
  229. package/tests/selectors/back-end-selectors.json +19 -0
  230. package/tests/selectors/cms-contentful-admin.json +35 -0
  231. package/tests/selectors/cms-craft-admin.json +39 -0
  232. package/tests/selectors/cms-drupal-cms-gin.json +56 -0
  233. package/tests/selectors/cms-drupal-core-claro.json +50 -0
  234. package/tests/selectors/cms-generic-admin.json +34 -0
  235. package/tests/selectors/cms-ghost-admin.json +34 -0
  236. package/tests/selectors/cms-joomla-admin.json +41 -0
  237. package/tests/selectors/cms-magento2-admin.json +32 -0
  238. package/tests/selectors/cms-prestashop-admin.json +38 -0
  239. package/tests/selectors/cms-shopify-admin.json +25 -0
  240. package/tests/selectors/cms-strapi-admin.json +42 -0
  241. package/tests/selectors/cms-typo3-admin.json +41 -0
  242. package/tests/selectors/cms-woocommerce-front.json +50 -0
  243. package/tests/selectors/cms-wordpress-admin.json +31 -0
  244. package/tests/selectors/framework-ant-design.json +80 -0
  245. package/tests/selectors/framework-bootstrap.json +86 -0
  246. package/tests/selectors/framework-bulma.json +74 -0
  247. package/tests/selectors/framework-chakra.json +58 -0
  248. package/tests/selectors/framework-foundation.json +51 -0
  249. package/tests/selectors/framework-material-ui.json +72 -0
  250. package/tests/selectors/framework-shadcn.json +51 -0
  251. package/tests/selectors/framework-tailwind.json +40 -0
  252. package/tests/selectors/framework-vuetify.json +61 -0
  253. package/tests/selectors/front-end-selectors.json +16 -0
  254. package/tests/selectors/homepage-selectors.json +13 -0
  255. package/tests/step-definitions/a11y.steps.js +800 -0
  256. package/tests/step-definitions/action.steps.js +167 -0
  257. package/tests/step-definitions/api.steps.js +732 -0
  258. package/tests/step-definitions/assertion.steps.js +352 -0
  259. package/tests/step-definitions/auth.steps.js +126 -0
  260. package/tests/step-definitions/clock.steps.js +128 -0
  261. package/tests/step-definitions/cookie.steps.js +216 -0
  262. package/tests/step-definitions/debug.steps.js +39 -0
  263. package/tests/step-definitions/dialog.steps.js +193 -0
  264. package/tests/step-definitions/drupal-canvas.steps.js +764 -0
  265. package/tests/step-definitions/drupal-ckeditor.steps.js +108 -0
  266. package/tests/step-definitions/drupal-core.steps.js +665 -0
  267. package/tests/step-definitions/drupal-helpers.js +371 -0
  268. package/tests/step-definitions/drupal-layout-builder.steps.js +466 -0
  269. package/tests/step-definitions/drupal-media.steps.js +99 -0
  270. package/tests/step-definitions/drupal-moderation.steps.js +71 -0
  271. package/tests/step-definitions/drupal-paragraphs.steps.js +50 -0
  272. package/tests/step-definitions/element.steps.js +356 -0
  273. package/tests/step-definitions/field.steps.js +653 -0
  274. package/tests/step-definitions/file-download.steps.js +211 -0
  275. package/tests/step-definitions/form.steps.js +333 -0
  276. package/tests/step-definitions/iframe.steps.js +228 -0
  277. package/tests/step-definitions/input.steps.js +202 -0
  278. package/tests/step-definitions/javascript.steps.js +232 -0
  279. package/tests/step-definitions/keyboard.steps.js +112 -0
  280. package/tests/step-definitions/link.steps.js +142 -0
  281. package/tests/step-definitions/metatag.steps.js +91 -0
  282. package/tests/step-definitions/modal.steps.js +244 -0
  283. package/tests/step-definitions/navigation.steps.js +218 -0
  284. package/tests/step-definitions/network.steps.js +280 -0
  285. package/tests/step-definitions/path.steps.js +141 -0
  286. package/tests/step-definitions/response.steps.js +98 -0
  287. package/tests/step-definitions/responsive.steps.js +125 -0
  288. package/tests/step-definitions/rest.steps.js +111 -0
  289. package/tests/step-definitions/screenshot.steps.js +423 -0
  290. package/tests/step-definitions/scroll.steps.js +189 -0
  291. package/tests/step-definitions/selectors.steps.js +1003 -0
  292. package/tests/step-definitions/storage.steps.js +194 -0
  293. package/tests/step-definitions/table.steps.js +181 -0
  294. package/tests/step-definitions/varbase-e2e.js +897 -0
  295. package/tests/step-definitions/varbase.steps.js +458 -0
  296. package/tests/step-definitions/video.steps.js +178 -0
  297. package/tests/step-definitions/wait.steps.js +400 -0
  298. package/tests/step-definitions/web-first.steps.js +298 -0
  299. package/tests/step-definitions/xml.steps.js +411 -0
  300. package/tests/step-definitions/yaml.steps.js +913 -0
  301. package/tsconfig.json +26 -0
@@ -0,0 +1,47 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset='utf-8'>
5
+ <title>Press Button</title>
6
+ <style>
7
+ .container,
8
+ .container input,
9
+ .container button{
10
+ font-size: 26px;
11
+ }
12
+ body{
13
+ background-color: lightcoral;
14
+ }
15
+ .unamecss{
16
+ border: solid 5px red;
17
+ }
18
+
19
+ </style>
20
+
21
+ <script>
22
+ function onClick(){
23
+ const username = document.getElementById("uname");
24
+ username.style.borderColor = "green";
25
+ document.body.style.backgroundColor = "white";
26
+ }
27
+ </script>
28
+
29
+ </head>
30
+ <body>
31
+ <h1>Login</h1>
32
+
33
+ <div class="container">
34
+ <p><label for="uname">Username</label></p>
35
+ <p><input id="uname" class="unamecss" type="text" placeholder="Enter Username" name="username"></p>
36
+
37
+ <p><label for="pword">Password</label></p>
38
+ <p><input id="pword" class="pwordcss" type="password" placeholder="Enter Password" name="password"></p>
39
+
40
+ <p><input id="btnLogin" class="btnLogin" name="btnLogin" type="button" value="Submit" onclick="onClick()"></p>
41
+
42
+ </div>
43
+
44
+ <div id="result" class="style"></div><br/>
45
+
46
+ </body>
47
+ </html>
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset='utf-8'>
5
+ <title>Click Link</title>
6
+ <style>
7
+ .style {
8
+ font-size: 26px;
9
+ }
10
+ </style>
11
+ </head>
12
+ <body>
13
+ <h1>Click Link</h1>
14
+ <div id="result" class="style">
15
+ <ul>
16
+ <li><a id="aboutUsid" class="aboutUs" title="aboutUsTitle" href="about-us.html">About us</a></li>
17
+ <li><a id="contactUsid" class="contactUs" href="contact-us.html">Contact us</a></li>
18
+ </ul>
19
+ </div>
20
+ </body>
21
+ </html>
@@ -0,0 +1,27 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset='utf-8'>
5
+ <title>Multi Select</title>
6
+ </head>
7
+ <body>
8
+ <h1>Multi Select</h1>
9
+
10
+ <label for="Colors">Colors:</label>
11
+ <select name="Colors" id="Colors" multiple size="5">
12
+ <option value="red">Red</option>
13
+ <option value="blue">Blue</option>
14
+ <option value="green">Green</option>
15
+ <option value="yellow">Yellow</option>
16
+ <option value="black">Black</option>
17
+ </select>
18
+
19
+ <label for="Roles">Roles:</label>
20
+ <select name="Roles" id="Roles" multiple size="4">
21
+ <option value="admin">Admin</option>
22
+ <option value="editor">Editor</option>
23
+ <option value="viewer">Viewer</option>
24
+ <option value="guest">Guest</option>
25
+ </select>
26
+ </body>
27
+ </html>
@@ -0,0 +1,50 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+ <meta charset='utf-8'>
6
+ <title>Press Button</title>
7
+ <style>
8
+ .style {
9
+ font-size: 26px;
10
+ }
11
+ </style>
12
+ <script>
13
+ function onClick() {
14
+ const imageUpload = document.getElementById("fileUpload");
15
+ const element = document.getElementById("result");
16
+ const filePathArr = imageUpload.value.split('\\');
17
+ element.innerText = filePathArr[filePathArr.length - 1];
18
+
19
+ const file = imageUpload.files[0];
20
+
21
+ // Create a FileReader object
22
+ const reader = new FileReader();
23
+
24
+ // Set up the reader's onload event handler
25
+ reader.onload = function(e) {
26
+ // Get the image data URL
27
+ const imageDataUrl = e.target.result;
28
+
29
+ // Display the uploaded image
30
+ const imagePreview = document.getElementById('imagePreview');
31
+ imagePreview.src = imageDataUrl;
32
+ };
33
+
34
+ // Read the selected file as Data URL
35
+ reader.readAsDataURL(file);
36
+
37
+ }
38
+ </script>
39
+ </head>
40
+
41
+ <body>
42
+ <label for="myfile">Select a file:</label>
43
+ <input type="file" id="fileUpload" name="fileUpload"><br><br>
44
+ <img id="imagePreview" src="#" width="150" height="150" />
45
+ <div id="result" class="style"></div><br />
46
+ <input type="submit" value="Submit" onclick="onClick()">
47
+
48
+ </body>
49
+
50
+ </html>
@@ -0,0 +1,47 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+ <meta charset='utf-8'>
6
+ <title>Check Item</title>
7
+ <style>
8
+ .style {
9
+ height: 50px;
10
+ font-size: 26px;
11
+ line-height: 50px;
12
+ }
13
+ </style>
14
+ <script>
15
+ function onClick() {
16
+ var vehicle = document.forms[0];
17
+ var txt = "";
18
+ var i;
19
+ for (i = 0; i < vehicle.length; i++) {
20
+ if (vehicle[i].checked) {
21
+ txt = txt + vehicle[i].value + " ";
22
+ }
23
+ }
24
+ const element = document.getElementById("result");
25
+ element.innerText = "You have a " + txt;
26
+ }
27
+ </script>
28
+ </head>
29
+
30
+ <body>
31
+ <h1>Check Option</h1>
32
+ <form>
33
+ <input type="checkbox" id="bike" name="bike" value="Bike">
34
+ <label for="vehicle1"> I have a bike</label><br>
35
+ <input type="checkbox" id="car" name="car" value="Car">
36
+ <label for="vehicle2"> I have a car</label><br>
37
+ <input type="checkbox" id="boat" name="boat" value="Boat">
38
+ <label for="vehicle3"> I have a boat</label><br>
39
+ <input type="checkbox" id="van" name="van" value="Van">
40
+ <label for="vehicle4"> I have a van</label><br>
41
+ </form>
42
+
43
+ <input id="btnClick" class="btnClick" name="btnClick" type="button" value="Submit" onclick="onClick()">
44
+ <div id="result" class="style"></div><br />
45
+ </body>
46
+
47
+ </html>
@@ -0,0 +1,18 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset='utf-8'>
5
+ <title>Click Link</title>
6
+ <style>
7
+ .style{
8
+ font-size: 26px;
9
+ }
10
+ </style>
11
+ </head>
12
+ <body>
13
+ <h1>Click Link</h1>
14
+ <div id="result" class="style">
15
+ Please click <a id="aboutUsid" class="aboutUs" href="about-us.html">About us link</a> for more information.
16
+ </div>
17
+ </body>
18
+ </html>
@@ -0,0 +1,178 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Table Row Click Test</title>
7
+ <style>
8
+ body {
9
+ font-family: Arial, sans-serif;
10
+ margin: 20px;
11
+ }
12
+ table {
13
+ border-collapse: collapse;
14
+ width: 100%;
15
+ margin: 20px 0;
16
+ }
17
+ th, td {
18
+ border: 1px solid #ddd;
19
+ padding: 8px;
20
+ text-align: left;
21
+ }
22
+ th {
23
+ background-color: #f2f2f2;
24
+ }
25
+ .action-btn {
26
+ background-color: #007bff;
27
+ color: white;
28
+ border: none;
29
+ padding: 5px 10px;
30
+ cursor: pointer;
31
+ border-radius: 3px;
32
+ margin: 2px;
33
+ }
34
+ .action-btn:hover {
35
+ background-color: #0056b3;
36
+ }
37
+ .edit-btn { background-color: #28a745; }
38
+ .delete-btn { background-color: #dc3545; }
39
+ .view-btn { background-color: #17a2b8; }
40
+ #result {
41
+ margin-top: 20px;
42
+ padding: 10px;
43
+ background-color: #f8f9fa;
44
+ border: 1px solid #dee2e6;
45
+ border-radius: 4px;
46
+ }
47
+ </style>
48
+ </head>
49
+ <body>
50
+ <h1>Table Row Click Test Page</h1>
51
+ <p>This page demonstrates clicking specific text within table rows for automated testing.</p>
52
+
53
+ <h2>Users Table</h2>
54
+ <table id="users-table">
55
+ <thead>
56
+ <tr>
57
+ <th>Name</th>
58
+ <th>Email</th>
59
+ <th>Role</th>
60
+ <th>Actions</th>
61
+ </tr>
62
+ </thead>
63
+ <tbody>
64
+ <tr>
65
+ <td>John Smith</td>
66
+ <td>john.smith@example.com</td>
67
+ <td>Admin</td>
68
+ <td>
69
+ <button class="action-btn edit-btn" onclick="performAction('edit', 'John Smith')">Edit</button>
70
+ <button class="action-btn view-btn" onclick="performAction('view', 'John Smith')">View Details</button>
71
+ <button class="action-btn delete-btn" onclick="performAction('delete', 'John Smith')">Delete</button>
72
+ </td>
73
+ </tr>
74
+ <tr>
75
+ <td>Jane Doe</td>
76
+ <td>jane.doe@example.com</td>
77
+ <td>User</td>
78
+ <td>
79
+ <button class="action-btn edit-btn" onclick="performAction('edit', 'Jane Doe')">Edit</button>
80
+ <button class="action-btn view-btn" onclick="performAction('view', 'Jane Doe')">View Details</button>
81
+ <button class="action-btn delete-btn" onclick="performAction('delete', 'Jane Doe')">Delete</button>
82
+ </td>
83
+ </tr>
84
+ <tr>
85
+ <td>Bob Johnson</td>
86
+ <td>bob.johnson@example.com</td>
87
+ <td>Manager</td>
88
+ <td>
89
+ <button class="action-btn edit-btn" onclick="performAction('edit', 'Bob Johnson')">Edit</button>
90
+ <button class="action-btn view-btn" onclick="performAction('view', 'Bob Johnson')">View Details</button>
91
+ <button class="action-btn delete-btn" onclick="performAction('delete', 'Bob Johnson')">Delete</button>
92
+ </td>
93
+ </tr>
94
+ </tbody>
95
+ </table>
96
+
97
+ <h2>Products Table</h2>
98
+ <table id="products-table">
99
+ <thead>
100
+ <tr>
101
+ <th>Product Name</th>
102
+ <th>Price</th>
103
+ <th>Stock</th>
104
+ <th>Actions</th>
105
+ </tr>
106
+ </thead>
107
+ <tbody>
108
+ <tr>
109
+ <td>Product A</td>
110
+ <td>$29.99</td>
111
+ <td>150</td>
112
+ <td>
113
+ <a href="#" class="action-btn" onclick="performAction('edit', 'Product A')">Edit</a>
114
+ <a href="#" class="action-btn" onclick="performAction('download', 'Product A')">Download</a>
115
+ </td>
116
+ </tr>
117
+ <tr>
118
+ <td>Product B</td>
119
+ <td>$49.99</td>
120
+ <td>75</td>
121
+ <td>
122
+ <a href="#" class="action-btn" onclick="performAction('edit', 'Product B')">Edit</a>
123
+ <a href="#" class="action-btn" onclick="performAction('download', 'Product B')">Download</a>
124
+ </td>
125
+ </tr>
126
+ </tbody>
127
+ </table>
128
+
129
+ <h2>Orders Table</h2>
130
+ <table id="orders-table">
131
+ <thead>
132
+ <tr>
133
+ <th>Order ID</th>
134
+ <th>Customer</th>
135
+ <th>Status</th>
136
+ <th>Actions</th>
137
+ </tr>
138
+ </thead>
139
+ <tbody>
140
+ <tr>
141
+ <td>Order #12345</td>
142
+ <td>Alice Cooper</td>
143
+ <td>Processing</td>
144
+ <td>
145
+ <span class="action-btn" onclick="performAction('view', 'Order #12345')">View Details</span>
146
+ <span class="action-btn" onclick="performAction('cancel', 'Order #12345')">Cancel</span>
147
+ </td>
148
+ </tr>
149
+ <tr>
150
+ <td>Order #67890</td>
151
+ <td>David Wilson</td>
152
+ <td>Shipped</td>
153
+ <td>
154
+ <span class="action-btn" onclick="performAction('view', 'Order #67890')">View Details</span>
155
+ <span class="action-btn" onclick="performAction('track', 'Order #67890')">Track</span>
156
+ </td>
157
+ </tr>
158
+ </tbody>
159
+ </table>
160
+
161
+ <div id="result">
162
+ <h3>Action Result:</h3>
163
+ <p id="action-message">No action performed yet.</p>
164
+ </div>
165
+
166
+ <script>
167
+ function performAction(action, identifier) {
168
+ const resultElement = document.getElementById('action-message');
169
+ const timestamp = new Date().toLocaleTimeString();
170
+ resultElement.innerHTML = `Performed (${action}) action on (${identifier})`;
171
+
172
+ // Prevent default link behavior
173
+ event.preventDefault();
174
+ return false;
175
+ }
176
+ </script>
177
+ </body>
178
+ </html>
@@ -0,0 +1,48 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset='utf-8'>
5
+ <title>Press Button</title>
6
+ <style>
7
+ .container,
8
+ .container input,
9
+ .container button{
10
+ font-size: 26px;
11
+ }
12
+ .style{
13
+ width: 400px;
14
+ height: 50px;
15
+ font-size: 18px;
16
+ line-height: 50px;
17
+ text-align: center;
18
+ }
19
+ </style>
20
+
21
+ <script>
22
+ function onClick(){
23
+ const username = document.getElementById("uname");
24
+ const password = document.getElementById("pword");
25
+ const element = document.getElementById("result");
26
+ element.innerText = "You enter Username: " + username.value + " and Password: " + password.value;
27
+ }
28
+ </script>
29
+
30
+ </head>
31
+ <body>
32
+ <h1>Login</h1>
33
+
34
+ <div class="container">
35
+ <p><label for="uname">Username</label></p>
36
+ <p><input id="uname" class="unamecss" type="text" placeholder="Your full name" name="username"></p>
37
+
38
+ <p><label for="pword">Password</label></p>
39
+ <p><input id="pword" class="pwordcss" type="password" placeholder="Your Password" name="password"></p>
40
+
41
+ <p><input id="btnLogin" class="btnLogin" name="btnLogin" type="button" value="Login" onclick="onClick()"></p>
42
+
43
+ </div>
44
+
45
+ <div id="result" class="style"></div><br/>
46
+
47
+ </body>
48
+ </html>
@@ -0,0 +1,31 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset='utf-8'>
5
+ <title>Press Button</title>
6
+ <style>
7
+ .style{
8
+ width: 400px;
9
+ height: 50px;
10
+ font-size: 26px;
11
+ line-height: 50px;
12
+ text-align: center;
13
+ }
14
+ </style>
15
+ <script>
16
+ function onClick(){
17
+ const element = document.getElementById("result");
18
+ element.innerText = "Button Pressed Successfully";
19
+ }
20
+ </script>
21
+ </head>
22
+ <body>
23
+ <h1>Press Button</h1>
24
+ <div id="result" class="style"></div><br/>
25
+ <label for="btn-pressid">Press button</label>
26
+ <button id="btn-pressid" class="btn-pressclass" name="btn-pressname" onclick="onClick()">Button</button>
27
+
28
+ <input type="submit" id="submit-pressid" class="submit-pressclass" name="submit-pressname" value="Submit" onclick="onClick()" />
29
+
30
+ </body>
31
+ </html>
@@ -0,0 +1,27 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset='utf-8'>
5
+ <title>Press Button</title>
6
+ <style>
7
+ .style{
8
+ width: 400px;
9
+ height: 50px;
10
+ font-size: 26px;
11
+ line-height: 50px;
12
+ text-align: center;
13
+ }
14
+ </style>
15
+ <script>
16
+ function onClick(){
17
+ const element = document.getElementById("result");
18
+ element.innerText = "Button Pressed Successfully";
19
+ }
20
+ </script>
21
+ </head>
22
+ <body>
23
+ <h1>Press Button</h1>
24
+ <div id="result" class="style"></div><br/>
25
+ <input id="btnClick" class="btnClick" name="btnClick" type="button" value="Submit" onclick="onClick()">
26
+ </body>
27
+ </html>
@@ -0,0 +1,177 @@
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
+ var wasAtBottom = false;
132
+ var everScrolledDown = false;
133
+ var lastScrollY = 0;
134
+
135
+ window.addEventListener('scroll', function () {
136
+ var scrollY = window.scrollY;
137
+ var docHeight = document.documentElement.scrollHeight;
138
+ var winHeight = window.innerHeight;
139
+ var maxScroll = docHeight - winHeight;
140
+ var atBottom = scrollY >= maxScroll - 10;
141
+ var atTop = scrollY <= 0;
142
+ var goingDown = scrollY > lastScrollY;
143
+
144
+ document.querySelectorAll('.indicator').forEach(function (el) { el.style.display = 'none'; });
145
+
146
+ if (atTop && everScrolledDown) {
147
+ document.getElementById('scroll-to-top').style.display = 'block';
148
+ } else if (atBottom) {
149
+ wasAtBottom = true;
150
+ everScrolledDown = true;
151
+ } else if (wasAtBottom && !goingDown) {
152
+ var distFromBottom = maxScroll - scrollY;
153
+ if (distFromBottom >= 340) {
154
+ document.getElementById('basic-scroll-up').style.display = 'block';
155
+ } else {
156
+ document.getElementById('custom-scroll-up').style.display = 'block';
157
+ }
158
+ } else if (scrollY >= 450) {
159
+ document.getElementById('custom-scroll-down').style.display = 'block';
160
+ everScrolledDown = true;
161
+ } else if (scrollY > 0) {
162
+ document.getElementById('basic-scroll-down').style.display = 'block';
163
+ everScrolledDown = true;
164
+ }
165
+
166
+ lastScrollY = scrollY;
167
+ });
168
+
169
+ // Add scroll event listener for the scrollable container
170
+ const scrollableContainer = document.getElementById('scrollable-container');
171
+ scrollableContainer.addEventListener('scroll', function() {
172
+ // This helps test element-specific scrolling
173
+ console.log('Scrollable container scrolled to:', this.scrollTop);
174
+ });
175
+
176
+ </script>
177
+ </html>