selenium-webdriver 4.33.0 → 4.35.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.
package/CHANGES.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 4.35.0
2
+
3
+ - Add CDP for Chrome 139 and remove 136
4
+ - Fix typos in javascript & rb (#16019)
5
+ - add `default` as a value for SameSite (#16129)
6
+ - [bidi]: fix flaky bidi network test - `can request cookies` (#16141)
7
+
8
+ ## 4.34.0
9
+
10
+ - Bumping to nightly versions
11
+ - Add warning when ftp proxy is used (#15905)
12
+ - specify min required node version to >=20.0.0
13
+ - [cdp] Add CDP for Chrome 138 and remove 135
14
+
1
15
  ## 4.33.0
2
16
 
3
17
  - [cdp] Add CDP for Chrome 137 and remove 134
@@ -884,7 +898,7 @@ to a remote Selenium server that supports Firefox 45.
884
898
  ### Changes
885
899
 
886
900
  - Removed native support for Firefox 46 and older.
887
- - The `SELENIUM_MARIONETTE` enviornment variable no longer has an effect.
901
+ - The `SELENIUM_MARIONETTE` environment variable no longer has an effect.
888
902
  - `selenium-webdriver/firefox.Capability.MARIONETTE` is deprecated.
889
903
  - `selenium-webdriver/firefox.Options#useGeckoDriver()` is deprecated and now
890
904
  a no-op.
@@ -994,7 +1008,7 @@ or newer.
994
1008
  - (**NOTICE**) The minimum supported version of Node is now 6.9.0 LTS
995
1009
  - Removed support for the SafariDriver browser extension. This has been replaced
996
1010
  by Apple's
997
- safaridriver, which is included wtih Safari 10
1011
+ safaridriver, which is included with Safari 10
998
1012
  (available on OS X El Capitan and macOS Sierra).
999
1013
 
1000
1014
  To use Safari 9 or older, users will have to use an older version of Selenium.
@@ -1011,7 +1025,7 @@ or newer.
1011
1025
  - Extending the `selenium-webdriver/testing` module to support tests defined
1012
1026
  using generator
1013
1027
  functions.
1014
- - The promise manager can be disabled by setting an enviornment variable:
1028
+ - The promise manager can be disabled by setting an environment variable:
1015
1029
  `SELENIUM_PROMISE_MANAGER=0`. This is part of a larger plan to remove the
1016
1030
  promise manager, as
1017
1031
  documented at
@@ -26,6 +26,7 @@ const SameSite = {
26
26
  STRICT: 'strict',
27
27
  LAX: 'lax',
28
28
  NONE: 'none',
29
+ DEFAULT: 'default',
29
30
 
30
31
  findByName(name) {
31
32
  return (
@@ -211,7 +212,7 @@ class Cookie {
211
212
  }
212
213
  }
213
214
 
214
- // No tests written for FetchTimingInfo. Must be updated after browsers implment it and corresponding WPT test are written.
215
+ // No tests written for FetchTimingInfo. Must be updated after browsers implement it and corresponding WPT test are written.
215
216
  /**
216
217
  * Represents the time of each part of the request.
217
218
  * Described in https://w3c.github.io/webdriver-bidi/#type-network-FetchTimingInfo.
@@ -93,7 +93,7 @@ const RemoteType = {
93
93
  }
94
94
 
95
95
  /**
96
- * Represents a speacial number type.
96
+ * Represents a special number type.
97
97
  * @enum
98
98
  * Described in https://w3c.github.io/webdriver-bidi/#type-script-PrimitiveProtocolValue.
99
99
  */
Binary file
Binary file
Binary file
@@ -16,7 +16,7 @@
16
16
  // under the License.
17
17
 
18
18
  /**
19
- * @fileoverview Demonstrates how to use WebDriver's logging sysem.
19
+ * @fileoverview Demonstrates how to use WebDriver's logging system.
20
20
  */
21
21
 
22
22
  'use strict'
package/io/exec.js CHANGED
@@ -41,7 +41,7 @@ class Options {
41
41
  this.env
42
42
 
43
43
  /**
44
- * IO conifguration for the spawned server child process. If unspecified,
44
+ * IO configuration for the spawned server child process. If unspecified,
45
45
  * the child process' IO output will be ignored.
46
46
  *
47
47
  * @type {(string|!Array<string|number|!stream.Stream|null|undefined>|
@@ -25,8 +25,8 @@ Number(d[1]),c=Number(d[2]),d=Number(d[3]),0<=b&&255>=b&&0<=c&&255>=c&&0<=d&&255
25
25
  function hb(a,b){var c=a.currentStyle||a.style,d=c[b];void 0===d&&k(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?void 0!==d?d:null:(a=gb(a))?hb(a,b):null}
26
26
  function ib(a,b,c){function d(g){var l=S(g);return 0<l.height&&0<l.width?!0:P(g,"PATH")&&(0<l.height||0<l.width)?(g=R(g,"stroke-width"),!!g&&0<parseInt(g,10)):"hidden"!=R(g,"overflow")&&ia(g.childNodes,function(z){return 3==z.nodeType||P(z)&&d(z)})}function e(g){return jb(g)==T&&ja(g.childNodes,function(l){return!P(l)||e(l)||!d(l)})}if(!P(a))throw Error("Argument to isShown must be of type Element");if(P(a,"BODY"))return!0;if(P(a,"OPTION")||P(a,"OPTGROUP"))return a=La(a,function(g){return P(g,"SELECT")}),
27
27
  !!a&&ib(a,!0,c);var f=kb(a);if(f)return!!f.image&&0<f.rect.width&&0<f.rect.height&&ib(f.image,b,c);if(P(a,"INPUT")&&"hidden"==a.type.toLowerCase()||P(a,"NOSCRIPT"))return!1;f=R(a,"visibility");return"collapse"!=f&&"hidden"!=f&&c(a)&&(b||0!=lb(a))&&d(a)?!e(a):!1}
28
- function mb(a){function b(c){if(P(c)&&"none"==R(c,"display"))return!1;var d;if((d=c.parentNode)&&d.shadowRoot&&void 0!==c.assignedSlot)d=c.assignedSlot?c.assignedSlot.parentNode:null;else if(c.getDestinationInsertionPoints){var e=c.getDestinationInsertionPoints();0<e.length&&(d=e[e.length-1])}if(fb&&d instanceof ShadowRoot){if(d.host.shadowRoot&&d.host.shadowRoot!==d)return!1;d=d.host}return!d||9!=d.nodeType&&11!=d.nodeType?d&&P(d,"DETAILS")&&!d.open&&!P(c,"SUMMARY")?!1:!!d&&b(d):!0}return ib(a,!1,
29
- b)}var T="hidden";
28
+ function mb(a){function b(c){if(P(c)&&("none"==R(c,"display")||"hidden"==R(c,"content-visibility")))return!1;var d;if((d=c.parentNode)&&d.shadowRoot&&void 0!==c.assignedSlot)d=c.assignedSlot?c.assignedSlot.parentNode:null;else if(c.getDestinationInsertionPoints){var e=c.getDestinationInsertionPoints();0<e.length&&(d=e[e.length-1])}if(fb&&d instanceof ShadowRoot){if(d.host.shadowRoot&&d.host.shadowRoot!==d)return!1;d=d.host}return!d||9!=d.nodeType&&11!=d.nodeType?d&&P(d,"DETAILS")&&!d.open&&!P(c,"SUMMARY")?
29
+ !1:!!d&&b(d):!0}return ib(a,!1,b)}var T="hidden";
30
30
  function jb(a){function b(m){function p(wa){if(wa==g)return!0;var Pa=R(wa,"display");return 0==Pa.lastIndexOf("inline",0)||"contents"==Pa||"absolute"==Qa&&"static"==R(wa,"position")?!1:!0}var Qa=R(m,"position");if("fixed"==Qa)return A=!0,m==g?null:g;for(m=gb(m);m&&!p(m);)m=gb(m);return m}function c(m){var p=m;if("visible"==z)if(m==g&&l)p=l;else if(m==l)return{x:"visible",y:"visible"};p={x:R(p,"overflow-x"),y:R(p,"overflow-y")};m==g&&(p.x="visible"==p.x?"auto":p.x,p.y="visible"==p.y?"auto":p.y);return p}
31
31
  function d(m){if(m==g){var p=(new Ia(f)).a;m=p.scrollingElement?p.scrollingElement:Ba||"CSS1Compat"!=p.compatMode?p.body||p.documentElement:p.documentElement;p=p.parentWindow||p.defaultView;m=E&&Ha("10")&&p.pageYOffset!=m.scrollTop?new G(m.scrollLeft,m.scrollTop):new G(p.pageXOffset||m.scrollLeft,p.pageYOffset||m.scrollTop)}else m=new G(m.scrollLeft,m.scrollTop);return m}var e=nb(a),f=J(a),g=f.documentElement,l=f.body,z=R(g,"overflow"),A;for(a=b(a);a;a=b(a)){var t=c(a);if("visible"!=t.x||"visible"!=
32
32
  t.y){var v=S(a);if(0==v.width||0==v.height)return T;var B=e.a<v.a,K=e.b<v.b;if(B&&"hidden"==t.x||K&&"hidden"==t.y)return T;if(B&&"visible"!=t.x||K&&"visible"!=t.y){B=d(a);K=e.b<v.b-B.y;if(e.a<v.a-B.x&&"visible"!=t.x||K&&"visible"!=t.x)return T;e=jb(a);return e==T?T:"scroll"}B=e.h>=v.a+v.width;v=e.j>=v.b+v.height;if(B&&"hidden"==t.x||v&&"hidden"==t.y)return T;if(B&&"visible"!=t.x||v&&"visible"!=t.y){if(A&&(t=d(a),e.h>=g.scrollWidth-t.x||e.a>=g.scrollHeight-t.y))return T;e=jb(a);return e==T?T:"scroll"}}}return"none"}
@@ -25,5 +25,5 @@ return b}
25
25
  function Oa(a){var b=P(a,"MAP");if(!b&&!P(a,"AREA"))return null;var c=b?a:P(a.parentNode,"MAP")?a.parentNode:null,e=null,d=null;if(c&&c.name){e='*[usemap="#'+c.name+'"]';c=N(c);var f;if(f="function"!=aa(c.querySelector)&&C&&(C?0<=na(I,8):Ba(8))){f=c.querySelector;var h=typeof f;f=!("object"==h&&null!=f||"function"==h)}if(f)throw Error("CSS selection is not supported");if(!e)throw new m(32,"No selector specified");e=u(e);try{var n=c.querySelector(e)}catch(D){throw new m(32,"An invalid or illegal selector was specified");}if(e=
26
26
  n&&1==n.nodeType?n:null)d=V(e),b||"default"==a.shape.toLowerCase()||(a=Ra(a),b=Math.min(Math.max(a.a,0),d.width),n=Math.min(Math.max(a.b,0),d.height),d=new R(b+d.a,n+d.b,Math.min(a.width,d.width-b),Math.min(a.height,d.height-n)))}return{image:e,rect:d||new R(0,0,0,0)}}
27
27
  function Ra(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){b=a[0];var c=a[1];return new R(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new R(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){b=a[0];c=a[1];for(var e=b,d=c,f=2;f+1<a.length;f+=2)b=Math.min(b,a[f]),e=Math.max(e,a[f]),c=Math.min(c,a[f+1]),d=Math.max(d,a[f+1]);return new R(b,c,e-b,d-c)}return new R(0,0,0,0)}function Qa(a){a=V(a);return new Q(a.b,a.a+a.width,a.b+a.height,a.a)}
28
- function Pa(a){if(Ia){if("relative"==T(a,"position"))return 1;a=T(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Sa(a)}function Sa(a){var b=1,c=T(a,"opacity");c&&(b=Number(c));(a=S(a))&&(b*=Sa(a));return b};function Ta(a,b){function c(e){if(P(e)&&"none"==T(e,"display"))return!1;var d;if((d=e.parentNode)&&d.shadowRoot&&void 0!==e.assignedSlot)d=e.assignedSlot?e.assignedSlot.parentNode:null;else if(e.getDestinationInsertionPoints){var f=e.getDestinationInsertionPoints();0<f.length&&(d=f[f.length-1])}if(La&&d instanceof ShadowRoot){if(d.host.shadowRoot&&d.host.shadowRoot!==d)return!1;d=d.host}return!d||9!=d.nodeType&&11!=d.nodeType?d&&P(d,"DETAILS")&&!d.open&&!P(e,"SUMMARY")?!1:!!d&&c(d):!0}return U(a,
29
- !!b,c)}var X=["se_exportedFunctionSymbol"],Y=g;X[0]in Y||"undefined"==typeof Y.execScript||Y.execScript("var "+X[0]);for(var Z;X.length&&(Z=X.shift());)X.length||void 0===Ta?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=Ta;; return this.se_exportedFunctionSymbol.apply(null,arguments);}).apply(window, arguments);};
28
+ function Pa(a){if(Ia){if("relative"==T(a,"position"))return 1;a=T(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Sa(a)}function Sa(a){var b=1,c=T(a,"opacity");c&&(b=Number(c));(a=S(a))&&(b*=Sa(a));return b};function Ta(a,b){function c(e){if(P(e)&&("none"==T(e,"display")||"hidden"==T(e,"content-visibility")))return!1;var d;if((d=e.parentNode)&&d.shadowRoot&&void 0!==e.assignedSlot)d=e.assignedSlot?e.assignedSlot.parentNode:null;else if(e.getDestinationInsertionPoints){var f=e.getDestinationInsertionPoints();0<f.length&&(d=f[f.length-1])}if(La&&d instanceof ShadowRoot){if(d.host.shadowRoot&&d.host.shadowRoot!==d)return!1;d=d.host}return!d||9!=d.nodeType&&11!=d.nodeType?d&&P(d,"DETAILS")&&!d.open&&!P(e,
29
+ "SUMMARY")?!1:!!d&&c(d):!0}return U(a,!!b,c)}var X=["se_exportedFunctionSymbol"],Y=g;X[0]in Y||"undefined"==typeof Y.execScript||Y.execScript("var "+X[0]);for(var Z;X.length&&(Z=X.shift());)X.length||void 0===Ta?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=Ta;; return this.se_exportedFunctionSymbol.apply(null,arguments);}).apply(window, arguments);};
package/lib/proxy.js CHANGED
@@ -156,6 +156,9 @@ function direct() {
156
156
  * @return {!ManualConfig} A new proxy configuration object.
157
157
  */
158
158
  function manual({ ftp, http, https, bypass }) {
159
+ if (ftp !== undefined) {
160
+ console.warn('ftpProxy is deprecated and will be removed in the future')
161
+ }
159
162
  return {
160
163
  proxyType: Type.MANUAL,
161
164
  ftpProxy: ftp,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "selenium-webdriver",
3
- "version": "4.33.0",
3
+ "version": "4.35.0",
4
4
  "description": "The official WebDriver JavaScript bindings from the Selenium project",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -20,13 +20,13 @@
20
20
  "url": "https://github.com/SeleniumHQ/selenium.git"
21
21
  },
22
22
  "engines": {
23
- "node": ">= 18.20.5"
23
+ "node": ">= 20.0.0"
24
24
  },
25
25
  "dependencies": {
26
26
  "@bazel/runfiles": "^6.3.1",
27
27
  "jszip": "^3.10.1",
28
28
  "tmp": "^0.2.3",
29
- "ws": "^8.18.0"
29
+ "ws": "^8.18.2"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@eslint/js": "^9.18.0",
@@ -43,10 +43,10 @@
43
43
  "jsdoc": "^4.0.4",
44
44
  "mocha": "^11.0.1",
45
45
  "mocha-junit-reporter": "^2.2.1",
46
- "multer": "1.4.5-lts.1",
46
+ "multer": "1.4.5-lts.2",
47
47
  "prettier": "^3.4.2",
48
48
  "serve-index": "^1.9.1",
49
- "sinon": "^19.0.2",
49
+ "sinon": "^19.0.5",
50
50
  "supports-color": "^10.0.0"
51
51
  },
52
52
  "scripts": {
package/remote/index.js CHANGED
@@ -399,7 +399,7 @@ DriverService.Builder = class {
399
399
  /**
400
400
  * Defines the environment to start the server under. This setting will be
401
401
  * inherited by every browser session started by the server. By default, the
402
- * server will inherit the enviroment of the current process.
402
+ * server will inherit the environment of the current process.
403
403
  *
404
404
  * @param {(Map<string, string>|Object<string, string>|null)} env The desired
405
405
  * environment to use, or `null` if the server should inherit the
package/testing/index.js CHANGED
@@ -260,7 +260,7 @@ const URL_MAP = /** !WeakMap<!Environment, ?(string|remote.SeleniumServer)> */ n
260
260
  */
261
261
  class Environment {
262
262
  /**
263
- * @param {!TargetBrowser} browser the browser targetted in this environment.
263
+ * @param {!TargetBrowser} browser the browser targeted in this environment.
264
264
  * @param {?(string|remote.SeleniumServer)=} url remote URL of an existing
265
265
  * Selenium server to test against.
266
266
  */