From c0521a05b6d77d2d170e58559b0ed35172e23925 Mon Sep 17 00:00:00 2001 From: Henrik Skupin Date: Mon, 3 Apr 2023 13:01:21 +0200 Subject: [PATCH] Import of v0.33.0 (#2100) --- CHANGES.md | 98 ++++++++- Cargo.lock | 422 ++++++++++++++++++++++-------------- Cargo.toml | 6 +- LICENSE | 86 ++++---- doc/Bugs.md | 2 +- doc/Releasing.md | 36 +-- doc/Support.md | 8 +- doc/TraceLogs.md | 29 ++- doc/Usage.md | 25 +++ marionette/Cargo.toml | 2 +- marionette/src/webdriver.rs | 58 +++++ src/capabilities.rs | 8 +- src/marionette.rs | 78 ++++--- 13 files changed, 604 insertions(+), 254 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 626ba37..3fb016a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,8 +3,79 @@ All notable changes to this program are documented in this file. +## 0.33.0 (2023-04-03, `a80e5fd61076`) + +### Known problems + +- _Startup hang with Firefox running in a container (e.g. snap, flatpak):_ + + When Firefox is packaged inside a container (like the default Firefox browser + shipped with Ubuntu 22.04), it may see a different filesystem to the host. + This can affect access to the generated profile directory, which may result + in a hang when starting Firefox. Workarounds are listed in the geckodriver + [usage documentation]. + +- _Potential hang with `moz:debuggerAddress` capability set to `true`:_ + + After enabling the site-isolation feature in Firefox with geckodriver 0.32.1 + some WebDriver clients like Selenium that use the Chrome DevTools Protocol (CDP) + by default for logging events could trigger a hang in Firefox's experimental CDP + implementation. The fix for this problem will be shipped with Firefox 112. + Until then the following Firefox preferences should be set: + + - `fission.bfcacheInParent: false` + - `fission.webContentIsolationStrategy: 0` + +### Added + +- Support for [Get Computed Label] and [Get Computed Role] + + The command [Get Computed Label] returns the accessibility label (sometimes + also referred to as Accessible Name), which is a short string that labels the + function of the control (e.g. the string "Comment" or "Sign In" on a button). + + The command [Get Computed Role] returns the reserved token value (in ARIA, + button, heading, etc.) that describes the type of control or content in the + element. + + Note that the minimum required Firefox version is 113.0. + +- Support for [Find Element From Shadow Root] and [Find Elements From Shadow Root] + + The commands allow a lookup of individual elements or collections of elements + within an open or closed Shadow DOM. All location strategies except `Tag name` and + `XPath selector` are currently supported. + + Note that the minimum required Firefox version is 113.0. + +### Changed + +- The Mozilla specific capability `moz:useNonSpecCompliantPointerOrigin` has been + marked as deprecated. Its removal is planned for the Firefox 116.0 release. + ## 0.32.2 (2023-02-08, `602aa16c20d4`) +### Known problems + +- _Startup hang with Firefox running in a container (e.g. snap, flatpak):_ + + When Firefox is packaged inside a container (like the default Firefox browser + shipped with Ubuntu 22.04), it may see a different filesystem to the host. + This can affect access to the generated profile directory, which may result + in a hang when starting Firefox. Workarounds are listed in the geckodriver + [usage documentation]. + +- _Potential hang with `moz:debuggerAddress` capability set to `true`:_ + + After enabling the site-isolation feature in Firefox with geckodriver 0.32.1 + some WebDriver clients like Selenium that use the Chrome DevTools Protocol (CDP) + by default for logging events could trigger a hang in Firefox's experimental CDP + implementation. The fix for this problem will be shipped with Firefox 112. + Until then the following Firefox preferences should be set: + + - `fission.bfcacheInParent: false` + - `fission.webContentIsolationStrategy: 0` + ### Fixed - With the release of geckodriver 0.32.1 the marionette crate was inappropriately @@ -13,6 +84,27 @@ All notable changes to this program are documented in this file. ## 0.32.1 (2023-02-02, `b7f075124503`) +### Known problems + +- _Startup hang with Firefox running in a container (e.g. snap, flatpak):_ + + When Firefox is packaged inside a container (like the default Firefox browser + shipped with Ubuntu 22.04), it may see a different filesystem to the host. + This can affect access to the generated profile directory, which may result + in a hang when starting Firefox. Workarounds are listed in the geckodriver + [usage documentation]. + +- _Potential hang with `moz:debuggerAddress` capability set to `true`:_ + + After enabling the site-isolation feature in Firefox with geckodriver 0.32.1 + some WebDriver clients like Selenium that use the Chrome DevTools Protocol (CDP) + by default for logging events could trigger a hang in Firefox's experimental CDP + implementation. The fix for this problem will be shipped with Firefox 112. + Until then the following Firefox preferences should be set: + + - `fission.bfcacheInParent: false` + - `fission.webContentIsolationStrategy: 0` + ### Fixed - When using the boolean capability `moz:debuggerAddress` with a value of `true` @@ -1648,6 +1740,7 @@ and greater. - Squash compile warnings [README]: https://github.com/mozilla/geckodriver/blob/master/README.md +[usage documentation]: [Browser Toolbox]: https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox [WebDriver conformance]: https://wpt.fyi/results/webdriver/tests?label=experimental [`webSocketUrl`]: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/webSocketUrl @@ -1703,8 +1796,11 @@ and greater. [webdriver crate]: https://crates.io/crates/webdriver [Actions]: https://w3c.github.io/webdriver/webdriver-spec.html#actions -[Delete Session]: https://w3c.github.io/webdriver/webdriver-spec.html#delete-session [Element Click]: https://w3c.github.io/webdriver/webdriver-spec.html#element-click +[Find Element From Shadow Root]: https://w3c.github.io/webdriver/#dfn-find-element-from-shadow-root +[Find Elements From Shadow Root]: https://w3c.github.io/webdriver/#dfn-find-elements-from-shadow-root +[Get Computed Label]: https://w3c.github.io/webdriver/#get-computed-label +[Get Computed Role]: https://w3c.github.io/webdriver/#get-computed-role [Get Element Shadow Root]: https://w3c.github.io/webdriver/#get-element-shadow-root [Get Timeouts]: https://w3c.github.io/webdriver/webdriver-spec.html#get-timeouts [Get Window Rect]: https://w3c.github.io/webdriver/webdriver-spec.html#get-window-rect diff --git a/Cargo.lock b/Cargo.lock index 72aa12b..157abfa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -38,6 +38,12 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" + [[package]] name = "bitflags" version = "1.3.2" @@ -46,9 +52,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] @@ -85,9 +91,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ "iana-time-zone", "js-sys", @@ -138,21 +144,21 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ - "time 0.3.17", + "time 0.3.20", "version_check", ] [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" dependencies = [ "libc", ] @@ -168,9 +174,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if", ] @@ -187,9 +193,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.89" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc831ee6a32dd495436e317595e639a587aa9907bef96fe6e6abc290ab6204e9" +checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" dependencies = [ "cc", "cxxbridge-flags", @@ -199,9 +205,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.89" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94331d54f1b1a8895cd81049f7eaaaef9d05a7dcb4d1fd08bf3ff0806246789d" +checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" dependencies = [ "cc", "codespan-reporting", @@ -209,24 +215,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn", + "syn 2.0.13", ] [[package]] name = "cxxbridge-flags" -version = "1.0.89" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48dcd35ba14ca9b40d6e4b4b39961f23d835dbb8eed74565ded361d93e1feb8a" +checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" [[package]] name = "cxxbridge-macro" -version = "1.0.89" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bbeb29798b407ccd82a3324ade1a7286e0d29851475990b612670f6f5124d2" +checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] @@ -259,11 +265,32 @@ dependencies = [ "winapi", ] +[[package]] +name = "errno" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "fastrand" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] @@ -295,9 +322,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -305,27 +332,27 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-core", "futures-sink", @@ -336,9 +363,9 @@ dependencies = [ [[package]] name = "geckodriver" -version = "0.32.2" +version = "0.33.0" dependencies = [ - "base64", + "base64 0.13.1", "chrono", "clap", "hyper", @@ -364,9 +391,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -385,9 +412,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" dependencies = [ "bytes", "fnv", @@ -414,7 +441,7 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ - "base64", + "base64 0.13.1", "bitflags", "bytes", "headers-core", @@ -433,11 +460,17 @@ dependencies = [ "http", ] +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + [[package]] name = "http" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", @@ -469,9 +502,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.24" +version = "0.14.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" dependencies = [ "bytes", "futures-channel", @@ -493,16 +526,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "0c17cc76786e99f8d2f055c11159e7f0091c42474dcc3189fbab96072e873e6d" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows", ] [[package]] @@ -527,9 +560,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown", @@ -544,11 +577,22 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "io-lifetimes" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys", +] + [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "js-sys" @@ -567,9 +611,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" [[package]] name = "line-wrap" @@ -595,6 +639,12 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +[[package]] +name = "linux-raw-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" + [[package]] name = "log" version = "0.4.17" @@ -606,9 +656,9 @@ dependencies = [ [[package]] name = "marionette" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38c1c2fa60208e240319aab7ec985220944e4d4a8920eb99f1855b6e6e6ab169" +checksum = "b834a6bbd4f1218f2e5588b2462b89c978841b2b64473152d15c4bbf725ac23a" dependencies = [ "serde", "serde_json", @@ -623,9 +673,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" @@ -648,9 +698,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc", "log", @@ -728,15 +778,15 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "os_str_bytes" -version = "6.4.1" +version = "6.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" +checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" [[package]] name = "percent-encoding" @@ -761,7 +811,7 @@ checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -778,41 +828,41 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "plist" -version = "1.4.0" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5329b8f106a176ab0dce4aae5da86bfcb139bb74fb00882859e03745011f3635" +checksum = "9bd9647b268a3d3e14ff09c23201133a62589c658db02bb7388c7246aafe0590" dependencies = [ - "base64", + "base64 0.21.0", "indexmap", "line-wrap", "quick-xml", "serde", - "time 0.3.17", + "time 0.3.20", ] [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] [[package]] name = "quick-xml" -version = "0.26.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd" +checksum = "e5c1a97b1bc42b1d550bfb48d4262153fe400a12bab1511821736f7eac76d7e2" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -826,6 +876,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -833,15 +892,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", - "redox_syscall", + "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regex" -version = "1.7.1" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" dependencies = [ "aho-corasick", "memchr", @@ -850,18 +909,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "rust-ini" @@ -869,20 +919,34 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a654c5bda722c699be6b0fe4c0d90de218928da5b724c3e467fc48865c37263" +[[package]] +name = "rustix" +version = "0.37.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d097081ed288dfe45699b72f5b5d648e5f15d64d900c7080273baa20c16a6849" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys", +] + [[package]] name = "rustls-pemfile" -version = "0.2.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" +checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" dependencies = [ - "base64", + "base64 0.21.0", ] [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "safemem" @@ -907,41 +971,41 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scratch" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" +checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" [[package]] name = "semver" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] name = "serde_json" -version = "1.0.92" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7434af0dc1cbd59268aa98b4c22c131c0584d2232f6fb166efb993e2832e896a" +checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" dependencies = [ "itoa", "ryu", @@ -950,13 +1014,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a5ec9fa74a20ebbe5d9ac23dac1fc96ba0ecfe9f50f2843b52e537b10fbcb4e" +checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] @@ -996,18 +1060,18 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ "autocfg", ] [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -1021,9 +1085,20 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.107" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "4c9da457c5285ac1f936ebd076af6dac17a61cfe7826f2076b4d015cf47bc8ec" dependencies = [ "proc-macro2", "quote", @@ -1032,16 +1107,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.3.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ "cfg-if", "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", + "redox_syscall 0.3.5", + "rustix", + "windows-sys", ] [[package]] @@ -1074,22 +1148,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] @@ -1105,9 +1179,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.17" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" +checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" dependencies = [ "itoa", "serde", @@ -1123,9 +1197,9 @@ checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" [[package]] name = "time-macros" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" dependencies = [ "time-core", ] @@ -1147,14 +1221,13 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.25.0" +version = "1.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" +checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio", "pin-project-lite", "socket2", @@ -1163,9 +1236,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" dependencies = [ "futures-core", "pin-project-lite", @@ -1174,9 +1247,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.4" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" dependencies = [ "bytes", "futures-core", @@ -1236,15 +1309,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.10" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" @@ -1311,12 +1384,11 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -1332,9 +1404,9 @@ dependencies = [ [[package]] name = "warp" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7b8be92646fc3d18b06147664ebc5f48d222686cb11a8755e561a735aacc6d" +checksum = "27e1a710288f0f91a98dd8a74f05b76a10768db245ce183edf64dc1afdc3016c" dependencies = [ "bytes", "futures-channel", @@ -1392,7 +1464,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] @@ -1414,7 +1486,7 @@ checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1427,11 +1499,11 @@ checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "webdriver" -version = "0.47.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc1b5ed60152b107b1859694ba709b546ab9fe5487f856f1255bc6cf8bed55e" +checksum = "cf9ae70f0cb12332fe144def990a9e62b20db2361b8784f879bb2814aad6c763" dependencies = [ - "base64", + "base64 0.13.1", "bytes", "cookie", "http", @@ -1439,7 +1511,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "time 0.3.17", + "time 0.3.20", "tokio", "tokio-stream", "unicode-segmentation", @@ -1478,11 +1550,29 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -1495,45 +1585,45 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "winreg" diff --git a/Cargo.toml b/Cargo.toml index 3f7062b..844bc6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2018" name = "geckodriver" -version = "0.32.2" +version = "0.33.0" authors = ["Mozilla"] include = [ "/.cargo", @@ -27,7 +27,7 @@ clap = { version = "~3.1", default-features = false, features = ["cargo", "std", hyper = "0.14" lazy_static = "1.0" log = { version = "0.4", features = ["std"] } -marionette = "0.3.0" +marionette = "0.4.0" mozdevice = "0.5.1" mozprofile = "0.9.1" mozrunner = "0.15.1" @@ -41,7 +41,7 @@ tempfile = "3" unicode-segmentation = "1.9" url = "2.0" uuid = { version = "1.0", features = ["v4"] } -webdriver = "0.47.1" +webdriver = "0.48.0" zip = { version = "0.6", default-features = false, features = ["deflate"] } [dev-dependencies] diff --git a/LICENSE b/LICENSE index a612ad9..9c3289a 100644 --- a/LICENSE +++ b/LICENSE @@ -2,6 +2,7 @@ Mozilla Public License Version 2.0 ================================== 1. Definitions + -------------- 1.1. "Contributor" @@ -84,6 +85,7 @@ Mozilla Public License Version 2.0 ownership of such entity. 2. License Grants and Conditions + -------------------------------- 2.1. Grants @@ -155,6 +157,7 @@ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1. 3. Responsibilities + ------------------- 3.1. Distribution of Source Form @@ -217,6 +220,7 @@ disclaimers of warranty and limitations of liability specific to any jurisdiction. 4. Inability to Comply Due to Statute or Regulation + --------------------------------------------------- If it is impossible for You to comply with any of the terms of this @@ -230,6 +234,7 @@ or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. 5. Termination + -------------- 5.1. The rights granted under this License will terminate automatically @@ -259,48 +264,53 @@ have been validly granted by You or Your distributors under this License prior to termination shall survive termination. ************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * + +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * + ************************************************************************ ************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * + +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * + ************************************************************************ 8. Litigation + ------------- Any litigation relating to this License may be brought only in the @@ -311,6 +321,7 @@ Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims. 9. Miscellaneous + ---------------- This License represents the complete agreement concerning the subject @@ -321,6 +332,7 @@ that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor. 10. Versions of the License + --------------------------- 10.1. New Versions @@ -357,7 +369,7 @@ Exhibit A - Source Code Form License Notice This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. + file, You can obtain one at . If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE diff --git a/doc/Bugs.md b/doc/Bugs.md index 6823e5d..b561bd4 100644 --- a/doc/Bugs.md +++ b/doc/Bugs.md @@ -38,7 +38,7 @@ character, we will continue with triaging it and file a bug where it is appropriate. Bugs specific to geckodriver will be filed in the [`Testing :: geckodriver`] component in Bugzilla. -[mailing list]: ./#communication +[mailing list]: index.rst/#communication [trace-level log]: TraceLogs.md [GitHub issue tracker]: https://github.com/mozilla/geckodriver/issues [ISSUE_TEMPLATE.md]: https://raw.githubusercontent.com/mozilla/geckodriver/master/ISSUE_TEMPLATE.md diff --git a/doc/Releasing.md b/doc/Releasing.md index 7089e39..79574f8 100644 --- a/doc/Releasing.md +++ b/doc/Releasing.md @@ -48,32 +48,42 @@ For each crate: 1. Change into the crates folder. 2. Bump the version number in `Cargo.toml` based on [semantic versioning rules], and also update the version dependency for other in-tree crates using the - currently modified crate. Note that running `cargo update` (see next step) - will fail if you missed updating a crate's dependency. Also use the - [cargo-semver-checks] command to validate the version change: + currently modified crate. Note that running `cargo update` will fail if you + missed updating a crate's dependency. + +3. Use the [cargo-semver-checks] command to validate the version change: ```shell % cargo semver-checks check-release ``` -3. Update the crate: `cargo update -p ` -4. We also publish audit information for the crates based on Mozilla's - [audit criteria], and that must be updated for each release. To do that run: +4. Update the crate: - ```shell - % ./mach cargo vet certify --force - ``` + ```shell + % cargo update -p + ``` + +5. We also publish audit information for the crates based on Mozilla's + [audit criteria]. Because we use [wildcard audit entries] make sure that the + latest day of publication is still within the `end` date. The related entry + of the crate can be found at the top of [audits.toml]. If the date is over, + then update its value to at most 1 year in the future. + +6. Commit the changes for the modified [Cargo.toml] files, [Cargo.lock] and + [audits.toml]. -5. Commit the changes for the modified [Cargo.toml] files, [Cargo.lock] and the - [supply-chain/] folder, which can be found in the repositories root folder. - Use a commit message like `Bug XYZ - [rust-] Release version `. + ```shell + % git add Cargo.toml Cargo.lock audits.toml testing + % git commit -m "Bug XYZ - [rust-] Release version " + ``` [semantic versioning rules]: https://semver.org/ [cargo-semver-checks]: https://crates.io/crates/cargo-semver-checks [audit criteria]: https://mozilla.github.io/cargo-vet/audit-criteria.html +[wildcard audit entries]: https://mozilla.github.io/cargo-vet/wildcard-audit-entries.html [Cargo.toml]: https://searchfox.org/mozilla-central/source/testing/geckodriver/Cargo.toml [Cargo.lock]: https://searchfox.org/mozilla-central/source/Cargo.lock -[supply-chain/]: https://searchfox.org/mozilla-central/source/supply-chain +[audits.toml]: https://searchfox.org/mozilla-central/source/supply-chain/audits.toml ## Update the change log diff --git a/doc/Support.md b/doc/Support.md index 5ff1890..0c06ee1 100644 --- a/doc/Support.md +++ b/doc/Support.md @@ -22,6 +22,12 @@ and required versions of Selenium and Firefox: max + + + 0.33.0 + ≥ 3.11 (3.14 Python) + 102 ESR + n/a 0.32.2 ≥ 3.11 (3.14 Python) @@ -162,7 +168,7 @@ supported release from Mozilla. To run tests on Android specific capabilities under `moz:firefoxOptions` have to be set when requesting a new session. See the Android section under -[Firefox Capabilities](Capabilities.html#android) for more details. +[Firefox Capabilities](Capabilities.md#android) for more details. [geckodriver releases]: https://github.com/mozilla/geckodriver/releases [Selenium]: https://github.com/seleniumhq/selenium diff --git a/doc/TraceLogs.md b/doc/TraceLogs.md index 1c0c18f..fb4e298 100644 --- a/doc/TraceLogs.md +++ b/doc/TraceLogs.md @@ -118,7 +118,7 @@ constructing the [`moz:firefoxOptions`] capabilities object: ```csharp FirefoxOptions options = new FirefoxOptions(); -options.LogLevel = FirefoxDriverLogLevel.Trace; +options.LogLevel = FirefoxDriverLogLevel.Trace; IWebDriver driver = new FirefoxDriver(options); ``` @@ -139,11 +139,34 @@ options.setLogLevel(FirefoxDriverLogLevel.TRACE); WebDriver driver = new FirefoxDriver(options); ``` -As with C#, the log output is helpfully propagated to stdout. +The log output is directed to stdout. [Java client]: https://seleniumhq.github.io/selenium/docs/api/java/ [`org.openqa.selenium.firefox.FirefoxOptions`]: https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/firefox/FirefoxOptions.html +## Javascript (webdriver.io) + +With the Selenium [JavaScript client] the capabilities object can directly be +constructed: + +```javascript +import WebDriver from 'webdriver' + +const driver = await WebDriver.newSession({ + capabilities: { + browserName: 'firefox', + 'moz:firefoxOptions': { + log: { level: 'trace' }, + } + } +}) +``` + +The log output is directed to stdout, or if geckodriver runs as a wdio plugin +then the generated logs are part of the wdio log system. + +[JavaScript client]: https://webdriver.io/ + ## Python The Selenium [Python client] comes with a @@ -177,5 +200,7 @@ opts = Selenium::WebDriver::Firefox::Options.new(log_level: :trace) driver = Selenium::WebDriver.for :firefox, options: opts ``` +The log output is directed to stdout. + [Ruby client]: https://seleniumhq.github.io/selenium/docs/api/rb/ [`Options`]: https://seleniumhq.github.io/selenium/docs/api/rb/Selenium/WebDriver/Firefox/Options.html diff --git a/doc/Usage.md b/doc/Usage.md index 1575da3..ee4ab86 100644 --- a/doc/Usage.md +++ b/doc/Usage.md @@ -4,6 +4,31 @@ geckodriver is an implementation of WebDriver, and WebDriver can be used for widely different purposes. How you invoke geckodriver largely depends on your use case. +## Running Firefox in a container-based package + +When Firefox is packaged inside a container (e.g. [Snap], [Flatpak]), it may +see a different filesystem to the host. This can affect access to the generated +profile directory, which may result in a hang when starting Firefox. + +This is known to affect launching the default Firefox shipped with Ubuntu 22.04+. + +There are several workarounds available for this problem: + +- Do not use container-packaged Firefox builds with geckodriver. Instead +download a Firefox release from +and a geckodriver release from . + +- Use a geckodriver that runs in the same container filesystem as the Firefox +package. For example on Ubuntu `/snap/bin/geckodriver` will work with the +default Firefox. + +- Set the `--profile-root` command line option to write the profile to a +directory accessible to both Firefox and geckodriver, for example a non-hidden +directory under `$HOME`. + +[Flatpak]: https://flatpak.org/ +[Snap]: https://ubuntu.com/core/services/guide/snaps-intro + ## Selenium If you are using geckodriver through [Selenium], you must ensure that diff --git a/marionette/Cargo.toml b/marionette/Cargo.toml index fbade53..2bcfaa3 100644 --- a/marionette/Cargo.toml +++ b/marionette/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "marionette" -version = "0.3.0" +version = "0.4.0" authors = ["Mozilla"] description = "Library implementing the client side of Gecko's Marionette remote automation protocol." edition = "2018" diff --git a/marionette/src/webdriver.rs b/marionette/src/webdriver.rs index efac877..fa1a489 100644 --- a/marionette/src/webdriver.rs +++ b/marionette/src/webdriver.rs @@ -196,6 +196,20 @@ pub enum Command { using: Selector, value: String, }, + #[serde(rename = "WebDriver:FindElementFromShadowRoot")] + FindShadowRootElement { + #[serde(rename = "shadowRoot")] + shadow_root: String, + using: Selector, + value: String, + }, + #[serde(rename = "WebDriver:FindElementsFromShadowRoot")] + FindShadowRootElements { + #[serde(rename = "shadowRoot")] + shadow_root: String, + using: Selector, + value: String, + }, #[serde(rename = "WebDriver:FullscreenWindow")] FullscreenWindow, #[serde(rename = "WebDriver:Navigate")] @@ -204,6 +218,10 @@ pub enum Command { GetActiveElement, #[serde(rename = "WebDriver:GetAlertText")] GetAlertText, + #[serde(rename = "WebDriver:GetComputedLabel")] + GetComputedLabel { id: String }, + #[serde(rename = "WebDriver:GetComputedRole")] + GetComputedRole { id: String }, #[serde(rename = "WebDriver:GetCookies")] GetCookies, #[serde(rename = "WebDriver:GetElementCSSValue")] @@ -441,6 +459,22 @@ mod tests { ); } + #[test] + fn test_json_get_computed_label_command() { + assert_ser_de( + &Command::GetComputedLabel { id: "foo".into() }, + json!({"WebDriver:GetComputedLabel": {"id": "foo"}}), + ); + } + + #[test] + fn test_json_get_computed_role_command() { + assert_ser_de( + &Command::GetComputedRole { id: "foo".into() }, + json!({"WebDriver:GetComputedRole": {"id": "foo"}}), + ); + } + #[test] fn test_json_get_css_value() { assert_ser_de( @@ -451,4 +485,28 @@ mod tests { json!({"WebDriver:GetElementCSSValue": {"id": "foo", "propertyName": "bar"}}), ); } + + #[test] + fn test_json_find_shadow_root_element() { + assert_ser_de( + &Command::FindShadowRootElement { + shadow_root: "foo".into(), + using: Selector::Css, + value: "bar".into(), + }, + json!({"WebDriver:FindElementFromShadowRoot": {"shadowRoot": "foo", "using": "css selector", "value": "bar"}}), + ); + } + + #[test] + fn test_json_find_shadow_root_elements() { + assert_ser_de( + &Command::FindShadowRootElements { + shadow_root: "foo".into(), + using: Selector::Css, + value: "bar".into(), + }, + json!({"WebDriver:FindElementsFromShadowRoot": {"shadowRoot": "foo", "using": "css selector", "value": "bar"}}), + ); + } } diff --git a/src/capabilities.rs b/src/capabilities.rs index e5f4566..73e1452 100644 --- a/src/capabilities.rs +++ b/src/capabilities.rs @@ -307,6 +307,7 @@ impl<'a> BrowserCapabilities for FirefoxCapabilities<'a> { } } "moz:useNonSpecCompliantPointerOrigin" => { + warn!("You are using the deprecated vendor specific capability 'moz:useNonSpecCompliantPointerOrigin', which will be removed in Firefox 116."); if !value.is_boolean() { return Err(WebDriverError::new( ErrorStatus::InvalidArgument, @@ -432,10 +433,9 @@ impl FirefoxOptions { rv.env = FirefoxOptions::load_env(options)?; rv.log = FirefoxOptions::load_log(options)?; rv.prefs = FirefoxOptions::load_prefs(options)?; - if let Some(profile) = FirefoxOptions::load_profile( - settings.profile_root.as_deref(), - options, - )? { + if let Some(profile) = + FirefoxOptions::load_profile(settings.profile_root.as_deref(), options)? + { rv.profile = ProfileType::Path(profile); } } diff --git a/src/marionette.rs b/src/marionette.rs index b89980e..836382b 100644 --- a/src/marionette.rs +++ b/src/marionette.rs @@ -17,12 +17,11 @@ use marionette_rs::common::{ use marionette_rs::marionette::AppStatus; use marionette_rs::message::{Command, Message, MessageId, Request}; use marionette_rs::webdriver::{ - Command as MarionetteWebDriverCommand, Keys as MarionetteKeys, - Locator as MarionetteLocator, NewWindow as MarionetteNewWindow, - PrintMargins as MarionettePrintMargins, PrintOrientation as MarionettePrintOrientation, - PrintPage as MarionettePrintPage, PrintParameters as MarionettePrintParameters, - ScreenshotOptions, Script as MarionetteScript, Selector as MarionetteSelector, - Url as MarionetteUrl, WindowRect as MarionetteWindowRect, + Command as MarionetteWebDriverCommand, Keys as MarionetteKeys, Locator as MarionetteLocator, + NewWindow as MarionetteNewWindow, PrintMargins as MarionettePrintMargins, + PrintOrientation as MarionettePrintOrientation, PrintPage as MarionettePrintPage, + PrintParameters as MarionettePrintParameters, ScreenshotOptions, Script as MarionetteScript, + Selector as MarionetteSelector, Url as MarionetteUrl, WindowRect as MarionetteWindowRect, }; use mozdevice::AndroidStorageInput; use serde::de::{self, Deserialize, Deserializer}; @@ -42,8 +41,9 @@ use webdriver::capabilities::BrowserCapabilities; use webdriver::command::WebDriverCommand::{ AcceptAlert, AddCookie, CloseWindow, DeleteCookie, DeleteCookies, DeleteSession, DismissAlert, ElementClear, ElementClick, ElementSendKeys, ExecuteAsyncScript, ExecuteScript, Extension, - FindElement, FindElementElement, FindElementElements, FindElements, FullscreenWindow, Get, - GetActiveElement, GetAlertText, GetCSSValue, GetCookies, GetCurrentUrl, GetElementAttribute, + FindElement, FindElementElement, FindElementElements, FindElements, FindShadowRootElement, + FindShadowRootElements, FullscreenWindow, Get, GetActiveElement, GetAlertText, GetCSSValue, + GetComputedLabel, GetComputedRole, GetCookies, GetCurrentUrl, GetElementAttribute, GetElementProperty, GetElementRect, GetElementTagName, GetElementText, GetNamedCookie, GetPageSource, GetShadowRoot, GetTimeouts, GetTitle, GetWindowHandle, GetWindowHandles, GetWindowRect, GoBack, GoForward, IsDisplayed, IsEnabled, IsSelected, MaximizeWindow, @@ -439,6 +439,8 @@ impl MarionetteSession { | GetCSSValue(_, _) | GetElementText(_) | GetElementTagName(_) + | GetComputedLabel(_) + | GetComputedRole(_) | IsEnabled(_) | ExecuteScript(_) | ExecuteAsyncScript(_) @@ -656,7 +658,7 @@ impl MarionetteSession { ); WebDriverResponse::Cookie(CookieResponse(cookie)) } - FindElement(_) | FindElementElement(_, _) => { + FindElement(_) | FindElementElement(_, _) | FindShadowRootElement(_, _) => { let element = self.to_web_element(try_opt!( resp.result.get("value"), ErrorStatus::UnknownError, @@ -664,7 +666,7 @@ impl MarionetteSession { ))?; WebDriverResponse::Generic(ValueResponse(serde_json::to_value(element)?)) } - FindElements(_) | FindElementElements(_, _) => { + FindElements(_) | FindElementElements(_, _) | FindShadowRootElements(_, _) => { let element_vec = try_opt!( resp.result.as_array(), ErrorStatus::UnknownError, @@ -775,12 +777,12 @@ fn try_convert_to_marionette_message( ElementClear(ref e) => Some(Command::WebDriver( MarionetteWebDriverCommand::ElementClear { id: e.clone().to_string(), - } + }, )), ElementClick(ref e) => Some(Command::WebDriver( MarionetteWebDriverCommand::ElementClick { id: e.clone().to_string(), - } + }, )), ElementSendKeys(ref e, ref x) => { let keys = x.to_marionette()?; @@ -824,6 +826,26 @@ fn try_convert_to_marionette_message( }, )) } + FindShadowRootElement(ref s, ref x) => { + let locator = x.to_marionette()?; + Some(Command::WebDriver( + MarionetteWebDriverCommand::FindShadowRootElement { + shadow_root: s.clone().to_string(), + using: locator.using.clone(), + value: locator.value, + }, + )) + } + FindShadowRootElements(ref s, ref x) => { + let locator = x.to_marionette()?; + Some(Command::WebDriver( + MarionetteWebDriverCommand::FindShadowRootElements { + shadow_root: s.clone().to_string(), + using: locator.using.clone(), + value: locator.value, + }, + )) + } FullscreenWindow => Some(Command::WebDriver( MarionetteWebDriverCommand::FullscreenWindow, )), @@ -834,6 +856,16 @@ fn try_convert_to_marionette_message( MarionetteWebDriverCommand::GetActiveElement, )), GetAlertText => Some(Command::WebDriver(MarionetteWebDriverCommand::GetAlertText)), + GetComputedLabel(ref e) => Some(Command::WebDriver( + MarionetteWebDriverCommand::GetComputedLabel { + id: e.clone().to_string(), + }, + )), + GetComputedRole(ref e) => Some(Command::WebDriver( + MarionetteWebDriverCommand::GetComputedRole { + id: e.clone().to_string(), + }, + )), GetCookies | GetNamedCookie(_) => { Some(Command::WebDriver(MarionetteWebDriverCommand::GetCookies)) } @@ -861,17 +893,17 @@ fn try_convert_to_marionette_message( GetElementRect(ref e) => Some(Command::WebDriver( MarionetteWebDriverCommand::GetElementRect { id: e.clone().to_string(), - } + }, )), GetElementTagName(ref e) => Some(Command::WebDriver( MarionetteWebDriverCommand::GetElementTagName { id: e.clone().to_string(), - } + }, )), GetElementText(ref e) => Some(Command::WebDriver( MarionetteWebDriverCommand::GetElementText { id: e.clone().to_string(), - } + }, )), GetPageSource => Some(Command::WebDriver( MarionetteWebDriverCommand::GetPageSource, @@ -897,18 +929,14 @@ fn try_convert_to_marionette_message( IsDisplayed(ref e) => Some(Command::WebDriver( MarionetteWebDriverCommand::IsDisplayed { id: e.clone().to_string(), - } - )), - IsEnabled(ref e) => Some(Command::WebDriver( - MarionetteWebDriverCommand::IsEnabled { - id: e.clone().to_string(), - } - )), - IsSelected(ref e) => Some(Command::WebDriver( - MarionetteWebDriverCommand::IsSelected { - id: e.clone().to_string(), }, )), + IsEnabled(ref e) => Some(Command::WebDriver(MarionetteWebDriverCommand::IsEnabled { + id: e.clone().to_string(), + })), + IsSelected(ref e) => Some(Command::WebDriver(MarionetteWebDriverCommand::IsSelected { + id: e.clone().to_string(), + })), MaximizeWindow => Some(Command::WebDriver( MarionetteWebDriverCommand::MaximizeWindow, )),