├── .github └── workflows │ └── ci.yml ├── Dockerfile ├── LICENSE ├── README.md ├── build.sh └── demo ├── .gitignore ├── conf.js ├── package-lock.json ├── package.json ├── run.sh └── spec ├── browser.spec.js └── support └── jasmine.json /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | workflow_dispatch: 7 | 8 | jobs: 9 | 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v2 15 | 16 | - name: Login to DockerHub 17 | uses: docker/login-action@v1 18 | with: 19 | username: ${{ secrets.DOCKERHUB_USERNAME }} 20 | password: ${{ secrets.DOCKERHUB_TOKEN }} 21 | 22 | - name: Build and push 23 | uses: docker/build-push-action@v2 24 | with: 25 | context: . 26 | tags: markhobson/node-chrome:latest 27 | push: true 28 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:20 2 | 3 | # Google Chrome 4 | 5 | RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ 6 | && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \ 7 | && apt-get update -qqy \ 8 | && apt-get -qqy install google-chrome-stable \ 9 | && rm /etc/apt/sources.list.d/google-chrome.list \ 10 | && rm -rf /var/lib/apt/lists/* /var/cache/apt/* \ 11 | && sed -i 's/"$HERE\/chrome"/"$HERE\/chrome" --no-sandbox/g' /opt/google/chrome/google-chrome 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # markhobson/node-chrome 2 | 3 | Docker image for Node.js automated UI tests. 4 | 5 | Includes: 6 | 7 | * Node.js 20.x 8 | * Chrome (latest) 9 | 10 | Available on [Docker Hub](https://hub.docker.com/r/markhobson/node-chrome/). 11 | 12 | ## Demo 13 | 14 | See the [demo](demo) npm project to see how this Docker image can be used to run UI tests. The [run.sh](demo/run.sh) script builds the project within the latest version of this image on Docker Hub. 15 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker build --pull -t node-chrome . 4 | -------------------------------------------------------------------------------- /demo/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /demo/conf.js: -------------------------------------------------------------------------------- 1 | exports.config = { 2 | capabilities: { 3 | browserName: 'chrome', 4 | chromeOptions: { 5 | args: ['--headless'] 6 | } 7 | }, 8 | framework: 'jasmine', 9 | specs: ['test/browser.spec.js'] 10 | }; 11 | -------------------------------------------------------------------------------- /demo/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docker-node-chrome-demo", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "docker-node-chrome-demo", 9 | "version": "1.0.0", 10 | "devDependencies": { 11 | "jasmine": "^5.1.0", 12 | "selenium-webdriver": "^4.18.1" 13 | } 14 | }, 15 | "node_modules/@isaacs/cliui": { 16 | "version": "8.0.2", 17 | "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", 18 | "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", 19 | "dev": true, 20 | "dependencies": { 21 | "string-width": "^5.1.2", 22 | "string-width-cjs": "npm:string-width@^4.2.0", 23 | "strip-ansi": "^7.0.1", 24 | "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", 25 | "wrap-ansi": "^8.1.0", 26 | "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" 27 | }, 28 | "engines": { 29 | "node": ">=12" 30 | } 31 | }, 32 | "node_modules/@pkgjs/parseargs": { 33 | "version": "0.11.0", 34 | "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", 35 | "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", 36 | "dev": true, 37 | "optional": true, 38 | "engines": { 39 | "node": ">=14" 40 | } 41 | }, 42 | "node_modules/ansi-regex": { 43 | "version": "6.0.1", 44 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", 45 | "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", 46 | "dev": true, 47 | "engines": { 48 | "node": ">=12" 49 | }, 50 | "funding": { 51 | "url": "https://github.com/chalk/ansi-regex?sponsor=1" 52 | } 53 | }, 54 | "node_modules/ansi-styles": { 55 | "version": "6.2.1", 56 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", 57 | "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", 58 | "dev": true, 59 | "engines": { 60 | "node": ">=12" 61 | }, 62 | "funding": { 63 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 64 | } 65 | }, 66 | "node_modules/balanced-match": { 67 | "version": "1.0.2", 68 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 69 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 70 | "dev": true 71 | }, 72 | "node_modules/brace-expansion": { 73 | "version": "2.0.1", 74 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 75 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 76 | "dev": true, 77 | "dependencies": { 78 | "balanced-match": "^1.0.0" 79 | } 80 | }, 81 | "node_modules/color-convert": { 82 | "version": "2.0.1", 83 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 84 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 85 | "dev": true, 86 | "dependencies": { 87 | "color-name": "~1.1.4" 88 | }, 89 | "engines": { 90 | "node": ">=7.0.0" 91 | } 92 | }, 93 | "node_modules/color-name": { 94 | "version": "1.1.4", 95 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 96 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 97 | "dev": true 98 | }, 99 | "node_modules/core-util-is": { 100 | "version": "1.0.3", 101 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", 102 | "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", 103 | "dev": true 104 | }, 105 | "node_modules/cross-spawn": { 106 | "version": "7.0.3", 107 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", 108 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", 109 | "dev": true, 110 | "dependencies": { 111 | "path-key": "^3.1.0", 112 | "shebang-command": "^2.0.0", 113 | "which": "^2.0.1" 114 | }, 115 | "engines": { 116 | "node": ">= 8" 117 | } 118 | }, 119 | "node_modules/eastasianwidth": { 120 | "version": "0.2.0", 121 | "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", 122 | "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", 123 | "dev": true 124 | }, 125 | "node_modules/emoji-regex": { 126 | "version": "9.2.2", 127 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", 128 | "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", 129 | "dev": true 130 | }, 131 | "node_modules/foreground-child": { 132 | "version": "3.1.1", 133 | "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", 134 | "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", 135 | "dev": true, 136 | "dependencies": { 137 | "cross-spawn": "^7.0.0", 138 | "signal-exit": "^4.0.1" 139 | }, 140 | "engines": { 141 | "node": ">=14" 142 | }, 143 | "funding": { 144 | "url": "https://github.com/sponsors/isaacs" 145 | } 146 | }, 147 | "node_modules/glob": { 148 | "version": "10.3.10", 149 | "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", 150 | "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", 151 | "dev": true, 152 | "dependencies": { 153 | "foreground-child": "^3.1.0", 154 | "jackspeak": "^2.3.5", 155 | "minimatch": "^9.0.1", 156 | "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", 157 | "path-scurry": "^1.10.1" 158 | }, 159 | "bin": { 160 | "glob": "dist/esm/bin.mjs" 161 | }, 162 | "engines": { 163 | "node": ">=16 || 14 >=14.17" 164 | }, 165 | "funding": { 166 | "url": "https://github.com/sponsors/isaacs" 167 | } 168 | }, 169 | "node_modules/immediate": { 170 | "version": "3.0.6", 171 | "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", 172 | "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", 173 | "dev": true 174 | }, 175 | "node_modules/inherits": { 176 | "version": "2.0.4", 177 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 178 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 179 | "dev": true 180 | }, 181 | "node_modules/is-fullwidth-code-point": { 182 | "version": "3.0.0", 183 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 184 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 185 | "dev": true, 186 | "engines": { 187 | "node": ">=8" 188 | } 189 | }, 190 | "node_modules/isarray": { 191 | "version": "1.0.0", 192 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 193 | "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", 194 | "dev": true 195 | }, 196 | "node_modules/isexe": { 197 | "version": "2.0.0", 198 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 199 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", 200 | "dev": true 201 | }, 202 | "node_modules/jackspeak": { 203 | "version": "2.3.6", 204 | "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", 205 | "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", 206 | "dev": true, 207 | "dependencies": { 208 | "@isaacs/cliui": "^8.0.2" 209 | }, 210 | "engines": { 211 | "node": ">=14" 212 | }, 213 | "funding": { 214 | "url": "https://github.com/sponsors/isaacs" 215 | }, 216 | "optionalDependencies": { 217 | "@pkgjs/parseargs": "^0.11.0" 218 | } 219 | }, 220 | "node_modules/jasmine": { 221 | "version": "5.1.0", 222 | "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-5.1.0.tgz", 223 | "integrity": "sha512-prmJlC1dbLhti4nE4XAPDWmfJesYO15sjGXVp7Cs7Ym5I9Xtwa/hUHxxJXjnpfLO72+ySttA0Ztf8g/RiVnUKw==", 224 | "dev": true, 225 | "dependencies": { 226 | "glob": "^10.2.2", 227 | "jasmine-core": "~5.1.0" 228 | }, 229 | "bin": { 230 | "jasmine": "bin/jasmine.js" 231 | } 232 | }, 233 | "node_modules/jasmine-core": { 234 | "version": "5.1.2", 235 | "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.1.2.tgz", 236 | "integrity": "sha512-2oIUMGn00FdUiqz6epiiJr7xcFyNYj3rDcfmnzfkBnHyBQ3cBQUs4mmyGsOb7TTLb9kxk7dBcmEmqhDKkBoDyA==", 237 | "dev": true 238 | }, 239 | "node_modules/jszip": { 240 | "version": "3.10.1", 241 | "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", 242 | "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", 243 | "dev": true, 244 | "dependencies": { 245 | "lie": "~3.3.0", 246 | "pako": "~1.0.2", 247 | "readable-stream": "~2.3.6", 248 | "setimmediate": "^1.0.5" 249 | } 250 | }, 251 | "node_modules/lie": { 252 | "version": "3.3.0", 253 | "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", 254 | "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", 255 | "dev": true, 256 | "dependencies": { 257 | "immediate": "~3.0.5" 258 | } 259 | }, 260 | "node_modules/lru-cache": { 261 | "version": "10.2.0", 262 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", 263 | "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", 264 | "dev": true, 265 | "engines": { 266 | "node": "14 || >=16.14" 267 | } 268 | }, 269 | "node_modules/minimatch": { 270 | "version": "9.0.3", 271 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", 272 | "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", 273 | "dev": true, 274 | "dependencies": { 275 | "brace-expansion": "^2.0.1" 276 | }, 277 | "engines": { 278 | "node": ">=16 || 14 >=14.17" 279 | }, 280 | "funding": { 281 | "url": "https://github.com/sponsors/isaacs" 282 | } 283 | }, 284 | "node_modules/minipass": { 285 | "version": "7.0.4", 286 | "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", 287 | "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", 288 | "dev": true, 289 | "engines": { 290 | "node": ">=16 || 14 >=14.17" 291 | } 292 | }, 293 | "node_modules/pako": { 294 | "version": "1.0.11", 295 | "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", 296 | "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", 297 | "dev": true 298 | }, 299 | "node_modules/path-key": { 300 | "version": "3.1.1", 301 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", 302 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 303 | "dev": true, 304 | "engines": { 305 | "node": ">=8" 306 | } 307 | }, 308 | "node_modules/path-scurry": { 309 | "version": "1.10.1", 310 | "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", 311 | "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", 312 | "dev": true, 313 | "dependencies": { 314 | "lru-cache": "^9.1.1 || ^10.0.0", 315 | "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" 316 | }, 317 | "engines": { 318 | "node": ">=16 || 14 >=14.17" 319 | }, 320 | "funding": { 321 | "url": "https://github.com/sponsors/isaacs" 322 | } 323 | }, 324 | "node_modules/process-nextick-args": { 325 | "version": "2.0.1", 326 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 327 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", 328 | "dev": true 329 | }, 330 | "node_modules/readable-stream": { 331 | "version": "2.3.8", 332 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", 333 | "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", 334 | "dev": true, 335 | "dependencies": { 336 | "core-util-is": "~1.0.0", 337 | "inherits": "~2.0.3", 338 | "isarray": "~1.0.0", 339 | "process-nextick-args": "~2.0.0", 340 | "safe-buffer": "~5.1.1", 341 | "string_decoder": "~1.1.1", 342 | "util-deprecate": "~1.0.1" 343 | } 344 | }, 345 | "node_modules/safe-buffer": { 346 | "version": "5.1.2", 347 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 348 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 349 | "dev": true 350 | }, 351 | "node_modules/selenium-webdriver": { 352 | "version": "4.18.1", 353 | "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.18.1.tgz", 354 | "integrity": "sha512-uP4OJ5wR4+VjdTi5oi/k8oieV2fIhVdVuaOPrklKghgS59w7Zz3nGa5gcG73VcU9EBRv5IZEBRhPr7qFJAj5mQ==", 355 | "dev": true, 356 | "dependencies": { 357 | "jszip": "^3.10.1", 358 | "tmp": "^0.2.1", 359 | "ws": ">=8.14.2" 360 | }, 361 | "engines": { 362 | "node": ">= 14.20.0" 363 | } 364 | }, 365 | "node_modules/setimmediate": { 366 | "version": "1.0.5", 367 | "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", 368 | "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", 369 | "dev": true 370 | }, 371 | "node_modules/shebang-command": { 372 | "version": "2.0.0", 373 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", 374 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 375 | "dev": true, 376 | "dependencies": { 377 | "shebang-regex": "^3.0.0" 378 | }, 379 | "engines": { 380 | "node": ">=8" 381 | } 382 | }, 383 | "node_modules/shebang-regex": { 384 | "version": "3.0.0", 385 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", 386 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 387 | "dev": true, 388 | "engines": { 389 | "node": ">=8" 390 | } 391 | }, 392 | "node_modules/signal-exit": { 393 | "version": "4.1.0", 394 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", 395 | "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", 396 | "dev": true, 397 | "engines": { 398 | "node": ">=14" 399 | }, 400 | "funding": { 401 | "url": "https://github.com/sponsors/isaacs" 402 | } 403 | }, 404 | "node_modules/string_decoder": { 405 | "version": "1.1.1", 406 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 407 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 408 | "dev": true, 409 | "dependencies": { 410 | "safe-buffer": "~5.1.0" 411 | } 412 | }, 413 | "node_modules/string-width": { 414 | "version": "5.1.2", 415 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", 416 | "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", 417 | "dev": true, 418 | "dependencies": { 419 | "eastasianwidth": "^0.2.0", 420 | "emoji-regex": "^9.2.2", 421 | "strip-ansi": "^7.0.1" 422 | }, 423 | "engines": { 424 | "node": ">=12" 425 | }, 426 | "funding": { 427 | "url": "https://github.com/sponsors/sindresorhus" 428 | } 429 | }, 430 | "node_modules/string-width-cjs": { 431 | "name": "string-width", 432 | "version": "4.2.3", 433 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 434 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 435 | "dev": true, 436 | "dependencies": { 437 | "emoji-regex": "^8.0.0", 438 | "is-fullwidth-code-point": "^3.0.0", 439 | "strip-ansi": "^6.0.1" 440 | }, 441 | "engines": { 442 | "node": ">=8" 443 | } 444 | }, 445 | "node_modules/string-width-cjs/node_modules/ansi-regex": { 446 | "version": "5.0.1", 447 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 448 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 449 | "dev": true, 450 | "engines": { 451 | "node": ">=8" 452 | } 453 | }, 454 | "node_modules/string-width-cjs/node_modules/emoji-regex": { 455 | "version": "8.0.0", 456 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 457 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 458 | "dev": true 459 | }, 460 | "node_modules/string-width-cjs/node_modules/strip-ansi": { 461 | "version": "6.0.1", 462 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 463 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 464 | "dev": true, 465 | "dependencies": { 466 | "ansi-regex": "^5.0.1" 467 | }, 468 | "engines": { 469 | "node": ">=8" 470 | } 471 | }, 472 | "node_modules/strip-ansi": { 473 | "version": "7.1.0", 474 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", 475 | "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", 476 | "dev": true, 477 | "dependencies": { 478 | "ansi-regex": "^6.0.1" 479 | }, 480 | "engines": { 481 | "node": ">=12" 482 | }, 483 | "funding": { 484 | "url": "https://github.com/chalk/strip-ansi?sponsor=1" 485 | } 486 | }, 487 | "node_modules/strip-ansi-cjs": { 488 | "name": "strip-ansi", 489 | "version": "6.0.1", 490 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 491 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 492 | "dev": true, 493 | "dependencies": { 494 | "ansi-regex": "^5.0.1" 495 | }, 496 | "engines": { 497 | "node": ">=8" 498 | } 499 | }, 500 | "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { 501 | "version": "5.0.1", 502 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 503 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 504 | "dev": true, 505 | "engines": { 506 | "node": ">=8" 507 | } 508 | }, 509 | "node_modules/tmp": { 510 | "version": "0.2.3", 511 | "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", 512 | "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", 513 | "dev": true, 514 | "engines": { 515 | "node": ">=14.14" 516 | } 517 | }, 518 | "node_modules/util-deprecate": { 519 | "version": "1.0.2", 520 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 521 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", 522 | "dev": true 523 | }, 524 | "node_modules/which": { 525 | "version": "2.0.2", 526 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 527 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 528 | "dev": true, 529 | "dependencies": { 530 | "isexe": "^2.0.0" 531 | }, 532 | "bin": { 533 | "node-which": "bin/node-which" 534 | }, 535 | "engines": { 536 | "node": ">= 8" 537 | } 538 | }, 539 | "node_modules/wrap-ansi": { 540 | "version": "8.1.0", 541 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", 542 | "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", 543 | "dev": true, 544 | "dependencies": { 545 | "ansi-styles": "^6.1.0", 546 | "string-width": "^5.0.1", 547 | "strip-ansi": "^7.0.1" 548 | }, 549 | "engines": { 550 | "node": ">=12" 551 | }, 552 | "funding": { 553 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 554 | } 555 | }, 556 | "node_modules/wrap-ansi-cjs": { 557 | "name": "wrap-ansi", 558 | "version": "7.0.0", 559 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 560 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 561 | "dev": true, 562 | "dependencies": { 563 | "ansi-styles": "^4.0.0", 564 | "string-width": "^4.1.0", 565 | "strip-ansi": "^6.0.0" 566 | }, 567 | "engines": { 568 | "node": ">=10" 569 | }, 570 | "funding": { 571 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 572 | } 573 | }, 574 | "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { 575 | "version": "5.0.1", 576 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 577 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 578 | "dev": true, 579 | "engines": { 580 | "node": ">=8" 581 | } 582 | }, 583 | "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { 584 | "version": "4.3.0", 585 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 586 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 587 | "dev": true, 588 | "dependencies": { 589 | "color-convert": "^2.0.1" 590 | }, 591 | "engines": { 592 | "node": ">=8" 593 | }, 594 | "funding": { 595 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 596 | } 597 | }, 598 | "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { 599 | "version": "8.0.0", 600 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 601 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 602 | "dev": true 603 | }, 604 | "node_modules/wrap-ansi-cjs/node_modules/string-width": { 605 | "version": "4.2.3", 606 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 607 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 608 | "dev": true, 609 | "dependencies": { 610 | "emoji-regex": "^8.0.0", 611 | "is-fullwidth-code-point": "^3.0.0", 612 | "strip-ansi": "^6.0.1" 613 | }, 614 | "engines": { 615 | "node": ">=8" 616 | } 617 | }, 618 | "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { 619 | "version": "6.0.1", 620 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 621 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 622 | "dev": true, 623 | "dependencies": { 624 | "ansi-regex": "^5.0.1" 625 | }, 626 | "engines": { 627 | "node": ">=8" 628 | } 629 | }, 630 | "node_modules/ws": { 631 | "version": "8.16.0", 632 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", 633 | "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", 634 | "dev": true, 635 | "engines": { 636 | "node": ">=10.0.0" 637 | }, 638 | "peerDependencies": { 639 | "bufferutil": "^4.0.1", 640 | "utf-8-validate": ">=5.0.2" 641 | }, 642 | "peerDependenciesMeta": { 643 | "bufferutil": { 644 | "optional": true 645 | }, 646 | "utf-8-validate": { 647 | "optional": true 648 | } 649 | } 650 | } 651 | } 652 | } 653 | -------------------------------------------------------------------------------- /demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docker-node-chrome-demo", 3 | "version": "1.0.0", 4 | "description": "Docker Node Chrome Demo", 5 | "scripts": { 6 | "test": "jasmine" 7 | }, 8 | "devDependencies": { 9 | "jasmine": "^5.1.0", 10 | "selenium-webdriver": "^4.18.1" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /demo/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DOCKER_IMAGE=markhobson/node-chrome 4 | 5 | docker pull $DOCKER_IMAGE 6 | docker run -it -v "$PWD":/usr/src -w /usr/src $DOCKER_IMAGE /bin/bash -c "npm --unsafe-perm install && npm test" 7 | -------------------------------------------------------------------------------- /demo/spec/browser.spec.js: -------------------------------------------------------------------------------- 1 | const { Builder, By, Browser } = require('selenium-webdriver'); 2 | const { Options } = require('selenium-webdriver/chrome'); 3 | 4 | describe('Browser', function() { 5 | let driver; 6 | 7 | beforeEach(async function() { 8 | driver = await new Builder() 9 | .forBrowser(Browser.CHROME) 10 | .setChromeOptions(new Options().addArguments("--headless=new")) 11 | .build(); 12 | }); 13 | 14 | afterEach(async function() { 15 | if (driver) { 16 | await driver.quit(); 17 | } 18 | }); 19 | 20 | it('can Duck', async function() { 21 | await driver.get('https://lite.duckduckgo.com/'); 22 | await driver.findElement(By.name('q')).sendKeys('fish\n'); 23 | await driver.findElement(By.css("input[type=submit]")).click(); 24 | 25 | expect(await driver.getTitle()).toContain('fish'); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /demo/spec/support/jasmine.json: -------------------------------------------------------------------------------- 1 | { 2 | "spec_dir": "spec", 3 | "spec_files": [ 4 | "**/*[sS]pec.?(m)js" 5 | ], 6 | "helpers": [ 7 | "helpers/**/*.?(m)js" 8 | ], 9 | "env": { 10 | "stopSpecOnExpectationFailure": false, 11 | "random": true 12 | } 13 | } 14 | --------------------------------------------------------------------------------