diff --git a/java/test/org/openqa/selenium/edge/EdgeDriverFunctionalTest.java b/java/test/org/openqa/selenium/edge/EdgeDriverFunctionalTest.java index 7e7dce47248bb..c8feca9c42834 100644 --- a/java/test/org/openqa/selenium/edge/EdgeDriverFunctionalTest.java +++ b/java/test/org/openqa/selenium/edge/EdgeDriverFunctionalTest.java @@ -116,20 +116,20 @@ void canSetPermission() { @NoDriverBeforeTest public void canSetPermissionHeadless() { EdgeOptions options = new EdgeOptions(); - options.addArguments("--headless=chrome"); + options.addArguments("--headless=new"); localDriver = new WebDriverBuilder().get(options); HasPermissions permissions = (HasPermissions) localDriver; localDriver.get(pages.clicksPage); assertThat(checkPermission(localDriver, CLIPBOARD_READ)).isEqualTo("prompt"); - assertThat(checkPermission(localDriver, CLIPBOARD_WRITE)).isEqualTo("prompt"); + assertThat(checkPermission(localDriver, CLIPBOARD_WRITE)).isEqualTo("granted"); permissions.setPermission(CLIPBOARD_READ, "granted"); - permissions.setPermission(CLIPBOARD_WRITE, "granted"); + permissions.setPermission(CLIPBOARD_WRITE, "prompt"); assertThat(checkPermission(localDriver, CLIPBOARD_READ)).isEqualTo("granted"); - assertThat(checkPermission(localDriver, CLIPBOARD_WRITE)).isEqualTo("granted"); + assertThat(checkPermission(localDriver, CLIPBOARD_WRITE)).isEqualTo("prompt"); } public String checkPermission(WebDriver driver, String permission) { diff --git a/java/test/org/openqa/selenium/grid/router/RemoteWebDriverDownloadTest.java b/java/test/org/openqa/selenium/grid/router/RemoteWebDriverDownloadTest.java index c8cea51cbaecb..3f0d7d1d3e8ec 100644 --- a/java/test/org/openqa/selenium/grid/router/RemoteWebDriverDownloadTest.java +++ b/java/test/org/openqa/selenium/grid/router/RemoteWebDriverDownloadTest.java @@ -30,6 +30,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Objects; +import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import org.junit.jupiter.api.AfterEach; @@ -57,6 +58,8 @@ class RemoteWebDriverDownloadTest { + private static final Set FILE_EXTENSIONS = Set.of(".txt", ".jpg"); + private Server server; private NettyAppServer appServer; private Capabilities capabilities; @@ -112,7 +115,15 @@ void canListDownloadedFiles() { driver.findElement(By.id("file-2")).click(); new WebDriverWait(driver, Duration.ofSeconds(5)) - .until(d -> ((HasDownloads) d).getDownloadableFiles().size() == 2); + .until( + d -> + ((HasDownloads) d) + .getDownloadableFiles().stream() + // ensure we hit no temporary file created by the browser while + // downloading + .filter((f) -> FILE_EXTENSIONS.stream().anyMatch(f::endsWith)) + .count() + == 2); List downloadableFiles = ((HasDownloads) driver).getDownloadableFiles(); assertThat(downloadableFiles).contains("file_1.txt", "file_2.jpg"); @@ -132,7 +143,12 @@ void canDownloadFiles() throws IOException { driver.findElement(By.id("file-1")).click(); new WebDriverWait(driver, Duration.ofSeconds(5)) - .until(d -> !((HasDownloads) d).getDownloadableFiles().isEmpty()); + .until( + d -> + ((HasDownloads) d) + .getDownloadableFiles().stream() + // ensure we hit no temporary file created by the browser while downloading + .anyMatch((f) -> FILE_EXTENSIONS.stream().anyMatch(f::endsWith))); String fileName = ((HasDownloads) driver).getDownloadableFiles().get(0); @@ -155,7 +171,12 @@ void testCanDeleteFiles() { driver.findElement(By.id("file-1")).click(); new WebDriverWait(driver, Duration.ofSeconds(5)) - .until(d -> !((HasDownloads) d).getDownloadableFiles().isEmpty()); + .until( + d -> + ((HasDownloads) d) + .getDownloadableFiles().stream() + // ensure we hit no temporary file created by the browser while downloading + .anyMatch((f) -> FILE_EXTENSIONS.stream().anyMatch(f::endsWith))); driver = new Augmenter().augment(driver); ((HasDownloads) driver).deleteDownloadableFiles(); diff --git a/javascript/node/selenium-webdriver/package.json b/javascript/node/selenium-webdriver/package.json index cb31db734d8ac..e06d9132c886a 100644 --- a/javascript/node/selenium-webdriver/package.json +++ b/javascript/node/selenium-webdriver/package.json @@ -29,19 +29,19 @@ "ws": "^8.18.0" }, "devDependencies": { - "@eslint/js": "^9.13.0", + "@eslint/js": "^9.14.0", "clean-jsdoc-theme": "^4.3.0", - "eslint": "^9.13.0", + "eslint": "^9.14.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-mocha": "^10.5.0", - "eslint-plugin-n": "^17.11.1", + "eslint-plugin-n": "^17.13.1", "eslint-plugin-no-only-tests": "^3.3.0", "eslint-plugin-prettier": "^5.2.1", "express": "^4.21.1", - "globals": "^15.11.0", + "globals": "^15.12.0", "has-flag": "^5.0.1", "jsdoc": "^4.0.4", - "mocha": "^10.7.3", + "mocha": "^10.8.2", "mocha-junit-reporter": "^2.2.1", "multer": "1.4.5-lts.1", "prettier": "^3.3.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a64531110e23e..f99a692e4df29 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -112,35 +112,35 @@ importers: version: 8.18.0 devDependencies: '@eslint/js': - specifier: ^9.13.0 - version: 9.13.0 + specifier: ^9.14.0 + version: 9.14.0 clean-jsdoc-theme: specifier: ^4.3.0 version: 4.3.0(jsdoc@4.0.4) eslint: - specifier: ^9.13.0 - version: 9.13.0(supports-color@9.4.0) + specifier: ^9.14.0 + version: 9.14.0(supports-color@9.4.0) eslint-config-prettier: specifier: ^9.1.0 - version: 9.1.0(eslint@9.13.0) + version: 9.1.0(eslint@9.14.0) eslint-plugin-mocha: specifier: ^10.5.0 - version: 10.5.0(eslint@9.13.0) + version: 10.5.0(eslint@9.14.0) eslint-plugin-n: - specifier: ^17.11.1 - version: 17.11.1(eslint@9.13.0) + specifier: ^17.13.1 + version: 17.13.1(eslint@9.14.0) eslint-plugin-no-only-tests: specifier: ^3.3.0 version: 3.3.0 eslint-plugin-prettier: specifier: ^5.2.1 - version: 5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.3.3) + version: 5.2.1(eslint-config-prettier@9.1.0)(eslint@9.14.0)(prettier@3.3.3) express: specifier: ^4.21.1 version: 4.21.1(supports-color@9.4.0) globals: - specifier: ^15.11.0 - version: 15.11.0 + specifier: ^15.12.0 + version: 15.12.0 has-flag: specifier: ^5.0.1 version: 5.0.1 @@ -148,11 +148,11 @@ importers: specifier: ^4.0.4 version: 4.0.4 mocha: - specifier: ^10.7.3 - version: 10.7.3 + specifier: ^10.8.2 + version: 10.8.2 mocha-junit-reporter: specifier: ^2.2.1 - version: 2.2.1(mocha@10.7.3)(supports-color@9.4.0) + version: 2.2.1(mocha@10.8.2)(supports-color@9.4.0) multer: specifier: 1.4.5-lts.1 version: 1.4.5-lts.1 @@ -798,13 +798,13 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@eslint-community/eslint-utils@4.4.1(eslint@9.13.0): + /@eslint-community/eslint-utils@4.4.1(eslint@9.14.0): resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 9.13.0(supports-color@9.4.0) + eslint: 9.14.0(supports-color@9.4.0) eslint-visitor-keys: 3.4.3 dev: true @@ -868,8 +868,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@eslint/js@9.13.0: - resolution: {integrity: sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==} + /@eslint/js@9.14.0: + resolution: {integrity: sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dev: true @@ -961,6 +961,11 @@ packages: engines: {node: '>=18.18'} dev: true + /@humanwhocodes/retry@0.4.1: + resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} + engines: {node: '>=18.18'} + dev: true + /@jest/expect-utils@29.7.0: resolution: {integrity: sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1921,7 +1926,7 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001677 + caniuse-lite: 1.0.30001678 electron-to-chromium: 1.5.52 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -1981,8 +1986,8 @@ packages: engines: {node: '>=10'} dev: true - /caniuse-lite@1.0.30001677: - resolution: {integrity: sha512-fmfjsOlJUpMWu+mAAtZZZHz7UEwsUxIIvu1TJfO1HqFQvB/B+ii0xr9B5HpbZY/mC4XZ8SvjHJqtAY6pDPQEog==} + /caniuse-lite@1.0.30001678: + resolution: {integrity: sha512-RR+4U/05gNtps58PEBDZcPWTgEO2MBeoPZ96aQcjmfkBWRIDfN451fW2qyDA9/+HohLLIL5GqiMwA+IB1pWarw==} /catharsis@0.9.0: resolution: {integrity: sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==} @@ -2152,8 +2157,8 @@ packages: yaml: 1.10.2 dev: false - /cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + /cross-spawn@7.0.5: + resolution: {integrity: sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==} engines: {node: '>= 8'} dependencies: path-key: 3.1.1 @@ -2615,23 +2620,23 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - /eslint-compat-utils@0.5.1(eslint@9.13.0): + /eslint-compat-utils@0.5.1(eslint@9.14.0): resolution: {integrity: sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==} engines: {node: '>=12'} peerDependencies: eslint: '>=6.0.0' dependencies: - eslint: 9.13.0(supports-color@9.4.0) + eslint: 9.14.0(supports-color@9.4.0) semver: 7.6.3 dev: true - /eslint-config-prettier@9.1.0(eslint@9.13.0): + /eslint-config-prettier@9.1.0(eslint@9.14.0): resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 9.13.0(supports-color@9.4.0) + eslint: 9.14.0(supports-color@9.4.0) dev: true /eslint-config-standard-jsx@11.0.0(eslint-plugin-react@7.37.2)(eslint@8.57.1): @@ -2720,16 +2725,16 @@ packages: - supports-color dev: true - /eslint-plugin-es-x@7.8.0(eslint@9.13.0): + /eslint-plugin-es-x@7.8.0(eslint@9.14.0): resolution: {integrity: sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '>=8' dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) '@eslint-community/regexpp': 4.12.1 - eslint: 9.13.0(supports-color@9.4.0) - eslint-compat-utils: 0.5.1(eslint@9.13.0) + eslint: 9.14.0(supports-color@9.4.0) + eslint-compat-utils: 0.5.1(eslint@9.14.0) dev: true /eslint-plugin-es@4.1.0(eslint@8.57.1): @@ -2780,14 +2785,14 @@ packages: - supports-color dev: true - /eslint-plugin-mocha@10.5.0(eslint@9.13.0): + /eslint-plugin-mocha@10.5.0(eslint@9.14.0): resolution: {integrity: sha512-F2ALmQVPT1GoP27O1JTZGrV9Pqg8k79OeIuvw63UxMtQKREZtmkK1NFgkZQ2TW7L2JSSFKHFPTtHu5z8R9QNRw==} engines: {node: '>=14.0.0'} peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 9.13.0(supports-color@9.4.0) - eslint-utils: 3.0.0(eslint@9.13.0) + eslint: 9.14.0(supports-color@9.4.0) + eslint-utils: 3.0.0(eslint@9.14.0) globals: 13.24.0 rambda: 7.5.0 dev: true @@ -2809,18 +2814,18 @@ packages: semver: 7.6.3 dev: true - /eslint-plugin-n@17.11.1(eslint@9.13.0): - resolution: {integrity: sha512-93IUD82N6tIEgjztVI/l3ElHtC2wTa9boJHrD8iN+NyDxjxz/daZUZKfkedjBZNdg6EqDk4irybUsiPwDqXAEA==} + /eslint-plugin-n@17.13.1(eslint@9.14.0): + resolution: {integrity: sha512-97qzhk1z3DdSJNCqT45EslwCu5+LB9GDadSyBItgKUfGsXAmN/aa7LRQ0ZxHffUxUzvgbTPJL27/pE9ZQWHy7A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.23.0' dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) enhanced-resolve: 5.17.1 - eslint: 9.13.0(supports-color@9.4.0) - eslint-plugin-es-x: 7.8.0(eslint@9.13.0) + eslint: 9.14.0(supports-color@9.4.0) + eslint-plugin-es-x: 7.8.0(eslint@9.14.0) get-tsconfig: 4.8.1 - globals: 15.11.0 + globals: 15.12.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 @@ -2831,7 +2836,7 @@ packages: engines: {node: '>=5.0.0'} dev: true - /eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0)(eslint@9.13.0)(prettier@3.3.3): + /eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0)(eslint@9.14.0)(prettier@3.3.3): resolution: {integrity: sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2845,8 +2850,8 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 9.13.0(supports-color@9.4.0) - eslint-config-prettier: 9.1.0(eslint@9.13.0) + eslint: 9.14.0(supports-color@9.4.0) + eslint-config-prettier: 9.1.0(eslint@9.14.0) prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 @@ -2929,13 +2934,13 @@ packages: eslint-visitor-keys: 2.1.0 dev: true - /eslint-utils@3.0.0(eslint@9.13.0): + /eslint-utils@3.0.0(eslint@9.14.0): resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 9.13.0(supports-color@9.4.0) + eslint: 9.14.0(supports-color@9.4.0) eslint-visitor-keys: 2.1.0 dev: true @@ -2975,7 +2980,7 @@ packages: '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 - cross-spawn: 7.0.3 + cross-spawn: 7.0.5 debug: 4.3.7 doctrine: 3.0.0 escape-string-regexp: 4.0.0 @@ -3007,8 +3012,8 @@ packages: - supports-color dev: true - /eslint@9.13.0(supports-color@9.4.0): - resolution: {integrity: sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==} + /eslint@9.14.0(supports-color@9.4.0): + resolution: {integrity: sha512-c2FHsVBr87lnUtjP4Yhvk4yEhKrQavGafRA/Se1ouse8PfbfC/Qh9Mxa00yWsZRlqeUB9raXip0aiiUZkgnr9g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -3017,21 +3022,21 @@ packages: jiti: optional: true dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.18.0(supports-color@9.4.0) '@eslint/core': 0.7.0 '@eslint/eslintrc': 3.1.0(supports-color@9.4.0) - '@eslint/js': 9.13.0 + '@eslint/js': 9.14.0 '@eslint/plugin-kit': 0.2.2 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.1 + '@humanwhocodes/retry': 0.4.1 '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 ajv: 6.12.6 chalk: 4.1.2 - cross-spawn: 7.0.3 + cross-spawn: 7.0.5 debug: 4.3.7(supports-color@9.4.0) escape-string-regexp: 4.0.0 eslint-scope: 8.2.0 @@ -3434,8 +3439,8 @@ packages: engines: {node: '>=18'} dev: true - /globals@15.11.0: - resolution: {integrity: sha512-yeyNSjdbyVaWurlwCpcA6XNBrHTMIeDdj0/hnvX/OLJ9ekOXYbLsLinH/MucQyGvNnXhidTdNhTtJaffL2sMfw==} + /globals@15.12.0: + resolution: {integrity: sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==} engines: {node: '>=18'} dev: true @@ -4310,7 +4315,7 @@ packages: hasBin: true dev: true - /mocha-junit-reporter@2.2.1(mocha@10.7.3)(supports-color@9.4.0): + /mocha-junit-reporter@2.2.1(mocha@10.8.2)(supports-color@9.4.0): resolution: {integrity: sha512-iDn2tlKHn8Vh8o4nCzcUVW4q7iXp7cC4EB78N0cDHIobLymyHNwe0XG8HEHHjc3hJlXm0Vy6zcrxaIhnI2fWmw==} peerDependencies: mocha: '>=2.2.5' @@ -4318,15 +4323,15 @@ packages: debug: 4.3.7(supports-color@9.4.0) md5: 2.3.0 mkdirp: 3.0.1 - mocha: 10.7.3 + mocha: 10.8.2 strip-ansi: 6.0.1 xml: 1.0.1 transitivePeerDependencies: - supports-color dev: true - /mocha@10.7.3: - resolution: {integrity: sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==} + /mocha@10.8.2: + resolution: {integrity: sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==} engines: {node: '>= 14.0.0'} hasBin: true dependencies: