diff --git a/CHANGES.md b/CHANGES.md index 8d76857..7bea91b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,10 +3,70 @@ All notable changes to this program are documented in this file. +## 0.32.0 (2022-10-13, `4563dd583110`) + +### Added + +- Support `wheel` input source for [Actions], which is associated with a + wheel-type input device. This endpoint is supported by geckodriver when + using Firefox version ≥106. + +- Support `touch` as `pointerType` for `pointer` input source for [Actions], + which is associated with a touch input device. This also includes the + addition of all the remaining properties for `pointer` input sources as + specified by WebDriver. This endpoint is supported by geckodriver when using + Firefox version ≥104. + +### Fixed + +- Using geckodriver to launch Firefox inside a sandbox -- for example + a Firefox distribution using Snap or Flatpak -- can fail with a + "Profile not found" error if the sandbox restricts Firefox's ability + to access the system temporary directory. geckodriver uses the + temporary directory to store Firefox profiles created during the run. + + This issue can now be worked around by using the `--profile-root` + command line option or setting the `TMPDIR` environment variable to + a location that both Firefox and geckodriver have read/write access + to e.g.: + + % mkdir $HOME/tmp + % geckodriver --profile-root=~/tmp + + or + + % TMPDIR=$HOME/tmp geckodriver + + Alternatively, geckodriver may be used with a Firefox install that + is not packaged inside a sandbox e.g. from [mozilla.org]. + +- The sandboxed Firefox binary is now automatically detected when geckodriver + is used from within a Snap confinement. + + Implemented by [Olivier Tilloy]. + +- The backup of the original Firefox preferences are now correctly restored + on Android when the WebDriver session ends. + +### Changed + +- Update dependencies + ## 0.31.0 (2022-04-11, `b617178ef491`) ### Known problems +- _Firefox running in Linux Sandbox (e.g. Snap package):_ + + Using geckodriver to launch Firefox inside a sandbox -- for example + a Firefox distribution using Snap or Flatpak -- can fail with a + "Profile not found" error if the sandbox restricts Firefox's ability + to access the system temporary directory. geckodriver uses the + temporary directory to store Firefox profiles created during the run. + + As workaround geckodriver may be used with a Firefox install that + is not packaged inside a sandbox e.g. from [mozilla.org]. + - _macOS 10.15 (Catalina) and later:_ Due to the requirement from Apple that all programs must be @@ -1572,6 +1632,7 @@ and greater. [enable remote debugging on the Android device]: https://developers.google.com/web/tools/chrome-devtools/remote-debugging [macOS notarization]: https://firefox-source-docs.mozilla.org/testing/geckodriver/Notarization.html [Rust]: https://rustup.rs/ +[mozilla.org] https://www.mozilla.org/firefox/ [`CloseWindowResponse`]: https://docs.rs/webdriver/newest/webdriver/response/struct.CloseWindowResponse.html [`CookieResponse`]: https://docs.rs/webdriver/newest/webdriver/response/struct.CookieResponse.html @@ -1632,7 +1693,6 @@ and greater. [David Burns]: https://github.com/AutomatedTester [Jason Juang]: https://github.com/juangj [Jeremy Lempereur]: https://github.com/o0Ignition0o -[Joshua Bruning]: https://github.com/joshbruning [Kalpesh Krishna]: https://github.com/martiansideofthemoon [Kriti Singh]: https://github.com/kritisingh1 [Mike Pennisi]: https://github.com/jugglinmike @@ -1641,3 +1701,4 @@ and greater. [Shivam Singhal]: https://github.com/championshuttler [Sven Jost]: https://github/mythsunwind [Vlad Filippov]: https://github.com/vladikoff +[Olivier Tilloy]: https://github.com/oSoMoN diff --git a/Cargo.lock b/Cargo.lock index bfc81a5..c5f2777 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,33 +10,27 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "0.7.18" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" dependencies = [ "memchr", ] [[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "base64" -version = "0.10.1" +name = "android_system_properties" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ - "byteorder", + "libc", ] [[package]] -name = "base64" -version = "0.12.3" +name = "autocfg" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" @@ -52,13 +46,19 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] +[[package]] +name = "bumpalo" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" + [[package]] name = "byteorder" version = "1.4.3" @@ -67,21 +67,15 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "0.5.6" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" +checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" [[package]] -name = "bytes" -version = "1.1.0" +name = "cc" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" [[package]] name = "cfg-if" @@ -91,46 +85,74 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.19" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" dependencies = [ - "libc", + "iana-time-zone", + "js-sys", "num-integer", "num-traits", - "time", - "winapi 0.3.9", + "time 0.1.44", + "wasm-bindgen", + "winapi", ] [[package]] name = "clap" -version = "3.1.8" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71c47df61d9e16dc010b55dba1952a57d8c215dbb533fd13cdd13369aac73b1c" +checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" dependencies = [ "bitflags", + "clap_lex", "indexmap", "lazy_static", - "os_str_bytes", "strsim", - "terminal_size", + "terminal_size 0.1.17", "textwrap", ] +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + [[package]] name = "cookie" -version = "0.12.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" +checksum = "344adc371239ef32293cb1c4fe519592fcf21206c79c02854320afcdf3ab4917" dependencies = [ - "time", + "time 0.3.15", + "version_check", ] +[[package]] +name = "core-foundation-sys" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" + [[package]] name = "cpufeatures" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" dependencies = [ "libc", ] @@ -141,24 +163,77 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" +dependencies = [ + "cfg-if", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", ] +[[package]] +name = "cxx" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f39818dcfc97d45b03953c1292efc4e80954e1583c4aa770bac1383e2310a4" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e580d70777c116df50c390d1211993f62d40302881e54d4b79727acb83d0199" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56a46460b88d1cec95112c8c363f0e2c39afdb237f60583b0b36343bf627ea9c" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "747b608fecf06b0d72d440f27acc99288207324b793be2c17991839f3d4995ea" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "digest" -version = "0.10.3" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c" dependencies = [ "block-buffer", "crypto-common", @@ -166,11 +241,10 @@ dependencies = [ [[package]] name = "dirs" -version = "2.0.2" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" dependencies = [ - "cfg-if 0.1.10", "dirs-sys", ] @@ -182,33 +256,46 @@ checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", "redox_users", - "winapi 0.3.9", + "winapi", +] + +[[package]] +name = "errno" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +dependencies = [ + "errno-dragonfly", + "libc", + "winapi", ] [[package]] -name = "dtoa" -version = "0.4.8" +name = "errno-dragonfly" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] [[package]] name = "fastrand" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" dependencies = [ "instant", ] [[package]] name = "flate2" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" +checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ - "cfg-if 1.0.0", "crc32fast", - "libc", "miniz_oxide", ] @@ -220,49 +307,18 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "matches", "percent-encoding", ] -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - -[[package]] -name = "futures" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - [[package]] name = "futures-channel" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" +checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050" dependencies = [ "futures-core", "futures-sink", @@ -270,46 +326,40 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" - -[[package]] -name = "futures-io" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" +checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf" [[package]] name = "futures-sink" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" +checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56" [[package]] name = "futures-task" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" +checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1" [[package]] name = "futures-util" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" +checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90" dependencies = [ "futures-core", "futures-sink", "futures-task", - "pin-project-lite 0.2.8", + "pin-project-lite", "pin-utils", ] [[package]] name = "geckodriver" -version = "0.31.0" +version = "0.32.0" dependencies = [ - "base64 0.12.3", + "base64", "chrono", "clap", "hyper", @@ -334,9 +384,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.5" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -344,22 +394,22 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" +checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] name = "h2" -version = "0.2.7" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" +checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be" dependencies = [ - "bytes 0.5.6", + "bytes", "fnv", "futures-core", "futures-sink", @@ -370,29 +420,28 @@ dependencies = [ "tokio", "tokio-util", "tracing", - "tracing-futures", ] [[package]] name = "hashbrown" -version = "0.11.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "headers" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cff78e5788be1e0ab65b04d306b2ed5092c815ec97ec70f4ebd5aee158aa55d" +checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ - "base64 0.13.0", + "base64", "bitflags", - "bytes 1.1.0", + "bytes", "headers-core", "http", - "httpdate 1.0.2", + "httpdate", "mime", - "sha-1", + "sha1", ] [[package]] @@ -406,36 +455,31 @@ dependencies = [ [[package]] name = "http" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ - "bytes 1.1.0", + "bytes", "fnv", - "itoa 1.0.1", + "itoa", ] [[package]] name = "http-body" -version = "0.3.1" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 0.5.6", + "bytes", "http", + "pin-project-lite", ] [[package]] name = "httparse" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9100414882e15fb7feccb4897e5f0ff0ff1ca7d1a86a23208ada4d7a18e6c6c4" - -[[package]] -name = "httpdate" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" @@ -445,11 +489,11 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.13.10" +version = "0.14.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb" +checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" dependencies = [ - "bytes 0.5.6", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -457,9 +501,9 @@ dependencies = [ "http", "http-body", "httparse", - "httpdate 0.3.2", - "itoa 0.4.8", - "pin-project 1.0.10", + "httpdate", + "itoa", + "pin-project-lite", "socket2", "tokio", "tower-service", @@ -467,22 +511,45 @@ dependencies = [ "want", ] +[[package]] +name = "iana-time-zone" +version = "0.1.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5a6ef98976b22b3b7f2f3a806f858cb862044cfa66805aa3ad84cb3d3b785ed" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "winapi", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fde6edd6cef363e9359ed3c98ba64590ba9eecba2293eb5a723ab32aee8926aa" +dependencies = [ + "cxx", + "cxx-build", +] + [[package]] name = "idna" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] [[package]] name = "indexmap" -version = "1.8.1" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", "hashbrown", @@ -494,38 +561,28 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", + "cfg-if", ] [[package]] -name = "itoa" -version = "0.4.8" +name = "io-lifetimes" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +checksum = "1ea37f355c05dde75b84bba2d767906ad522e97cd9e2eef2be7a4ab7fb442c06" [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] -name = "kernel32-sys" -version = "0.2.2" +name = "js-sys" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ - "winapi 0.2.8", - "winapi-build", + "wasm-bindgen", ] [[package]] @@ -536,9 +593,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.122" +version = "0.2.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec647867e2bf0772e28c8bcde4f0d19a9216916e890543b5a03ed8ef27b8f259" +checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c" [[package]] name = "line-wrap" @@ -549,19 +606,34 @@ dependencies = [ "safemem", ] +[[package]] +name = "link-cplusplus" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" +dependencies = [ + "cc", +] + [[package]] name = "linked-hash-map" -version = "0.5.4" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linux-raw-sys" +version = "0.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" [[package]] name = "log" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -575,17 +647,11 @@ dependencies = [ "serde_repr", ] -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "mime" @@ -605,43 +671,23 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.4.4" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" dependencies = [ "adler", - "autocfg", ] [[package]] name = "mio" -version = "0.6.23" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", "libc", "log", - "miow", - "net2", - "slab", - "winapi 0.2.8", -] - -[[package]] -name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", ] [[package]] @@ -662,18 +708,18 @@ dependencies = [ [[package]] name = "mozprofile" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5ac2d1cdb74a02db9ded3ca4d6fbd047a26db9ea67ac0343d0576c00d517652" +checksum = "dd320dce3c165cf4757a56f9cff929b747e003e80fcb9210a474dbb6e44d21c1" dependencies = [ "tempfile", ] [[package]] name = "mozrunner" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5619df94a42cf28fcfa03570d6c5eee07ca1296debde2502e642d7359e5fd099" +checksum = "69c22f9d5ab44661b7b767de8fd77e47a5b8b1738a60528e36d13cccc7398e72" dependencies = [ "dirs", "log", @@ -684,41 +730,20 @@ dependencies = [ [[package]] name = "mozversion" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "236ff9cf42e1474c8ff97b84c623d92c90f516e723d5a0dff5d248379e3d03cc" +checksum = "3e221ac6a095e7a40c8898783c9a10ec6a22601d569a0007d380ac455cc4d1f1" dependencies = [ "regex", "rust-ini", "semver", ] -[[package]] -name = "msdos_time" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aad9dfe950c057b1bfe9c1f2aa51583a8468ef2a5baba2ebbe06d775efeb7729" -dependencies = [ - "time", - "winapi 0.3.9", -] - -[[package]] -name = "net2" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", "num-traits", @@ -726,68 +751,54 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", ] [[package]] -name = "once_cell" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" - -[[package]] -name = "os_str_bytes" -version = "6.0.0" +name = "num_threads" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" dependencies = [ - "memchr", + "libc", ] [[package]] -name = "percent-encoding" -version = "2.1.0" +name = "once_cell" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" [[package]] -name = "pin-project" -version = "0.4.29" +name = "os_str_bytes" +version = "6.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9615c18d31137579e9ff063499264ddc1278e7b1982757ebc111028c4d1dc909" -dependencies = [ - "pin-project-internal 0.4.29", -] +checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" [[package]] -name = "pin-project" -version = "1.0.10" +name = "percent-encoding" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" -dependencies = [ - "pin-project-internal 1.0.10", -] +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] -name = "pin-project-internal" -version = "0.4.29" +name = "pin-project" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "044964427019eed9d49d9d5bbce6047ef18f37100ea400912a9fa4a3523ab12a" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" dependencies = [ - "proc-macro2", - "quote", - "syn", + "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", @@ -796,15 +807,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - -[[package]] -name = "pin-project-lite" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -814,47 +819,41 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "plist" -version = "0.5.5" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b59eb8d91dfa89208ec74a920e3b55f840476cf46568026c18dbaa2999e0d48" +checksum = "bd39bc6cdc9355ad1dc5eeedefee696bb35c34caf21768741e81826c0bbd7225" dependencies = [ - "base64 0.10.1", - "chrono", + "base64", "indexmap", "line-wrap", "serde", + "time 0.3.15", "xml-rs", ] -[[package]] -name = "podio" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b18befed8bc2b61abc79a457295e7e838417326da1586050b919414073977f19" - [[package]] name = "proc-macro2" -version = "1.0.37" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" +checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "quote" -version = "1.0.17" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632d02bff7f874a36f33ea8bb416cd484b90cc66c1194b1a1110d067a7013f58" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] [[package]] name = "redox_syscall" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags", ] @@ -872,9 +871,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" dependencies = [ "aho-corasick", "memchr", @@ -883,9 +882,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "remove_dir_all" @@ -893,7 +892,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -902,11 +901,34 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a654c5bda722c699be6b0fe4c0d90de218928da5b724c3e467fc48865c37263" +[[package]] +name = "rustix" +version = "0.35.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbb2fda4666def1433b1b05431ab402e42a1084285477222b72d6c564c417cef" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustls-pemfile" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" +dependencies = [ + "base64", +] + [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "safemem" @@ -930,34 +952,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" [[package]] -name = "semver" -version = "0.9.0" +name = "scratch" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] +checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" [[package]] -name = "semver-parser" -version = "0.7.0" +name = "semver" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" [[package]] name = "serde" -version = "1.0.136" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.136" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" dependencies = [ "proc-macro2", "quote", @@ -966,20 +985,20 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.79" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" +checksum = "41feea4228a6f1cd09ec7a3593a682276702cd67b5273544757dae23c096f074" dependencies = [ - "itoa 1.0.1", + "itoa", "ryu", "serde", ] [[package]] name = "serde_repr" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98d0516900518c29efa217c298fa1f4e6c6ffc85ae29fd7f4ee48f176e1a9ed5" +checksum = "1fe39d9fbb0ebf5eb2c7cb7e2a47e4f462fad1379f1166b8ae49ad9eae89a7ca" dependencies = [ "proc-macro2", "quote", @@ -988,21 +1007,21 @@ dependencies = [ [[package]] name = "serde_urlencoded" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ - "dtoa", - "itoa 0.4.8", + "form_urlencoded", + "itoa", + "ryu", "serde", - "url", ] [[package]] name = "serde_yaml" -version = "0.8.23" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a521f2940385c165a24ee286aa8599633d162077a54bdcae2a6fd5a7bfa7a0" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" dependencies = [ "indexmap", "ryu", @@ -1011,31 +1030,33 @@ dependencies = [ ] [[package]] -name = "sha-1" -version = "0.10.0" +name = "sha1" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] [[package]] name = "slab" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] [[package]] name = "socket2" -version = "0.3.19" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ - "cfg-if 1.0.0", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1046,13 +1067,13 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.91" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d" +checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -1061,12 +1082,21 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "libc", "redox_syscall", "remove_dir_all", - "winapi 0.3.9", + "winapi", +] + +[[package]] +name = "termcolor" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +dependencies = [ + "winapi-util", ] [[package]] @@ -1076,32 +1106,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", +] + +[[package]] +name = "terminal_size" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8440c860cf79def6164e4a0a983bcc2305d82419177a0e0c71930d049e3ac5a1" +dependencies = [ + "rustix", + "windows-sys", ] [[package]] name = "textwrap" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" +checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" dependencies = [ - "terminal_size", + "terminal_size 0.2.1", ] [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1110,19 +1150,38 @@ dependencies = [ [[package]] name = "time" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", - "winapi 0.3.9", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi", ] +[[package]] +name = "time" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d634a985c4d4238ec39cacaed2e7ae552fbd3c476b552c1deac3021b7d7eaf0c" +dependencies = [ + "itoa", + "libc", + "num_threads", + "time-macros", +] + +[[package]] +name = "time-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" + [[package]] name = "tinyvec" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] @@ -1135,70 +1194,70 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "0.2.25" +version = "1.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" +checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "iovec", - "lazy_static", + "autocfg", + "bytes", + "libc", "memchr", "mio", - "pin-project-lite 0.1.12", - "slab", + "pin-project-lite", + "socket2", + "winapi", +] + +[[package]] +name = "tokio-stream" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", ] [[package]] name = "tokio-util" -version = "0.3.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" dependencies = [ - "bytes 0.5.6", + "bytes", "futures-core", "futures-sink", - "log", - "pin-project-lite 0.1.12", + "pin-project-lite", "tokio", + "tracing", ] [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.32" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1bdf54a7c28a2bbf701e1d2233f6c77f473486b94bee4f9678da5a148dca7f" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", - "pin-project-lite 0.2.8", + "pin-project-lite", "tracing-core", ] [[package]] name = "tracing-core" -version = "0.1.24" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90442985ee2f57c9e1b548ee72ae842f4a9a20e3f417cc38dbc5dc684d9bb4ee" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", -] - -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project 1.0.10", - "tracing", + "once_cell", ] [[package]] @@ -1224,30 +1283,36 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.7" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" + +[[package]] +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" +checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" [[package]] -name = "unicode-xid" -version = "0.2.2" +name = "unicode-width" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "unix_path" @@ -1266,22 +1331,15 @@ checksum = "2ace0b4755d0a2959962769239d56267f8a024fef2d9b32666b3dcd0946b0906" [[package]] name = "url" -version = "2.2.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", "idna", - "matches", "percent-encoding", ] -[[package]] -name = "urlencoding" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a1f0175e03a0973cf4afd476bef05c26e228520400eb1fd473ad417b1c00ffb" - [[package]] name = "uuid" version = "0.8.2" @@ -1305,7 +1363,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", - "winapi 0.3.9", + "winapi", "winapi-util", ] @@ -1321,63 +1379,121 @@ dependencies = [ [[package]] name = "warp" -version = "0.2.5" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f41be6df54c97904af01aa23e613d4521eed7ab23537cede692d4058f6449407" +checksum = "ed7b8be92646fc3d18b06147664ebc5f48d222686cb11a8755e561a735aacc6d" dependencies = [ - "bytes 0.5.6", - "futures", + "bytes", + "futures-channel", + "futures-util", "headers", "http", "hyper", "log", "mime", "mime_guess", - "pin-project 0.4.29", + "percent-encoding", + "pin-project", + "rustls-pemfile", "scoped-tls", "serde", "serde_json", "serde_urlencoded", "tokio", + "tokio-stream", + "tokio-util", "tower-service", "tracing", - "tracing-futures", - "urlencoding", ] [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "webdriver" -version = "0.45.0" +version = "0.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ac57589eec8879f709240c532f6d238d492e204ec6828aeffaf311c20ff580" +checksum = "aac1bf6257c9610cbf46e68a515a7f15580e324e03983852e902edb143a8469e" dependencies = [ - "base64 0.12.3", - "bytes 0.5.6", + "base64", + "bytes", "cookie", "http", "log", "serde", "serde_derive", "serde_json", - "time", + "time 0.3.15", "tokio", + "tokio-stream", "unicode-segmentation", "url", "warp", ] -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -1388,12 +1504,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -1406,7 +1516,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1416,22 +1526,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "winreg" -version = "0.5.1" +name = "windows-sys" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27a759395c1195c4cc5cda607ef6f8f6498f64e78f7900f5de0a127a424704a" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "winapi 0.3.9", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", ] [[package]] -name = "ws2_32-sys" -version = "0.2.1" +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + +[[package]] +name = "winreg" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +checksum = "a27a759395c1195c4cc5cda607ef6f8f6498f64e78f7900f5de0a127a424704a" dependencies = [ - "winapi 0.2.8", - "winapi-build", + "winapi", ] [[package]] @@ -1451,12 +1594,12 @@ dependencies = [ [[package]] name = "zip" -version = "0.4.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36b9e08fb518a65cf7e08a1e482573eb87a2f4f8c6619316612a3c1f162fe822" +checksum = "537ce7411d25e54e8ae21a7ce0b15840e7bfcff15b51d697ec3266cc76bdf080" dependencies = [ + "byteorder", + "crc32fast", + "crossbeam-utils", "flate2", - "msdos_time", - "podio", - "time", ] diff --git a/Cargo.toml b/Cargo.toml index 014f016..e8297d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "geckodriver" -version = "0.31.0" +version = "0.32.0" description = "Proxy for using WebDriver clients to interact with Gecko-based browsers." keywords = ["webdriver", "w3c", "httpd", "mozilla", "firefox"] repository = "https://hg.mozilla.org/mozilla-central/file/tip/testing/geckodriver" @@ -10,26 +10,27 @@ authors = ["Mozilla"] edition = "2018" [dependencies] -base64 = "0.12" +base64 = "0.13" chrono = "0.4.6" -clap = { version = "3", default-features = false, features = ["cargo", "std", "suggestions", "wrap_help"] } -hyper = "0.13" +clap = { version = "~3.1", default-features = false, features = ["cargo", "std", "suggestions", "wrap_help"] } +hyper = "0.14" lazy_static = "1.0" log = { version = "0.4", features = ["std"] } marionette = "0.2.0" mozdevice = "0.5.0" -mozprofile = "0.8.0" -mozrunner = "0.14.0" -mozversion = "0.4.3" +mozprofile = "0.9.0" +mozrunner = "0.15.0" +mozversion = "0.5.0" regex = { version="1.0", default-features = false, features = ["perf", "std"] } serde = "1.0" serde_derive = "1.0" serde_json = "1.0" serde_yaml = "0.8" +tempfile = "3" url = "2.0" uuid = { version = "0.8", features = ["v4"] } -webdriver = "0.45.0" -zip = { version = "0.4", default-features = false, features = ["deflate"] } +webdriver = "0.47.0" +zip = { version = "0.6", default-features = false, features = ["deflate"] } [dev-dependencies] tempfile = "3" diff --git a/README.md b/README.md index 923c914..6329e48 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Downloads * [Releases](https://github.com/mozilla/geckodriver/releases/latest) * [Change log](https://searchfox.org/mozilla-central/source/testing/geckodriver/CHANGES.md) + Documentation ------------- diff --git a/doc/Flags.md b/doc/Flags.md index 2299e9e..9bc156d 100644 --- a/doc/Flags.md +++ b/doc/Flags.md @@ -1,7 +1,6 @@ -Flags -===== +# Flags -#### --allow-hosts ALLOW_HOSTS... +## --allow-hosts ALLOW_HOSTS... Values of the `Host` header to allow for incoming requests. @@ -12,7 +11,7 @@ with `Host` set to `geckodriver.test` or `webdriver.local`. Requests with `Host` set to an IP address are always allowed. -#### --allow-origins ALLOW_ORIGINS... +## --allow-origins ALLOW_ORIGINS... Values of the `Origin` header to allow for incoming requests. @@ -27,7 +26,7 @@ origin will be able to make requests to geckodriver. For example service on the origin with scheme `https`, hostname `webdriver.test`, and port `8080` to access the geckodriver instance. -#### --android-storage ANDROID_STORAGE +## --android-storage ANDROID_STORAGE **Deprecation warning**: This argument is deprecated and planned to be removed with the 0.31.0 release of geckodriver. As such it shouldn't be used with version @@ -77,7 +76,7 @@ By default `auto` is used. -#### -b BINARY / --binary BINARY +## -b BINARY / --binary BINARY Path to the Firefox binary to use. By default geckodriver tries to find and use the system installation of Firefox, but that behaviour @@ -104,7 +103,7 @@ scanning the Windows registry. [whereis(1)]: http://www.manpagez.com/man/1/whereis/ -#### --connect-existing +## --connect-existing Connect geckodriver to an existing Firefox instance. This means geckodriver will abstain from the default of starting a new Firefox @@ -120,24 +119,56 @@ using `--connect-existing` it is likely you will also have to use [`--marionette-port`]: #marionette-port -#### --host HOST +## --host HOST Host to use for the WebDriver server. Defaults to 127.0.0.1. +## --jsdebugger -#### --log LEVEL +Attach [browser toolbox] debugger when Firefox starts. This is +useful for debugging [Marionette] internals. + +To be prompted at the start of the test run or between tests, +you can set the `marionette.debugging.clicktostart` preference to +`true`. + +For reference, below is the list of preferences that enables the +chrome debugger. These are all set implicitly when the +argument is passed to geckodriver. + +* `devtools.browsertoolbox.panel` -> `jsdebugger` + + Selects the Debugger panel by default. + +* `devtools.chrome.enabled` → true + + Enables debugging of chrome code. + +* `devtools.debugger.prompt-connection` → false + + Controls the remote connection prompt. Note that this will + automatically expose your Firefox instance to localhost. + +* `devtools.debugger.remote-enabled` → true + + Allows a remote debugger to connect, which is necessary for + debugging chrome code. + +[browser toolbox]: https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox + +## --log LEVEL Set the Gecko and geckodriver log level. Possible values are `fatal`, `error`, `warn`, `info`, `config`, `debug`, and `trace`. -#### --marionette-host HOST +## --marionette-host HOST Selects the host for geckodriver’s connection to the [Marionette] remote protocol. Defaults to 127.0.0.1. -#### --marionette-port PORT +## --marionette-port PORT Selects the port for geckodriver’s connection to the [Marionette] remote protocol. @@ -152,52 +183,38 @@ under geckodriver’s control, it will simply connect to PORT. [`--connect-existing`]: #connect-existing -#### -p PORT / --port PORT +## -p PORT / --port PORT Port to use for the WebDriver server. Defaults to 4444. A helpful trick is that it is possible to bind to 0 to get the system to atomically assign a free port. -#### --jsdebugger - -Attach [browser toolbox] debugger when Firefox starts. This is -useful for debugging [Marionette] internals. - -To be prompted at the start of the test run or between tests, -you can set the `marionette.debugging.clicktostart` preference to -`true`. -For reference, below is the list of preferences that enables the -chrome debugger. These are all set implicitly when the -argument is passed to geckodriver. +## --profile-root PROFILE_ROOT - * `devtools.browsertoolbox.panel` -> `jsdebugger` +Path to the directory to use when creating temporary profiles. By +default this is the system temporary directory. Both geckodriver and +Firefox must have read-write access to this path. - Selects the Debugger panel by default. - - * `devtools.chrome.enabled` → true - - Enables debugging of chrome code. +This setting can be useful when Firefox is sandboxed from the host +filesystem such that it doesn't share the same system temporary +directory as geckodriver (e.g. when running Firefox inside a container +or packaged as a snap). - * `devtools.debugger.prompt-connection` → false - - Controls the remote connection prompt. Note that this will - automatically expose your Firefox instance to localhost. - * `devtools.debugger.remote-enabled` → true - - Allows a remote debugger to connect, which is necessary for - debugging chrome code. - - -[browser toolbox]: https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox - - -#### -v[v] +## -v[v] Increases the logging verbosity by to debug level when passing a single `-v`, or to trace level if `-vv` is passed. This is analogous to passing `--log debug` and `--log trace`, respectively. [Marionette]: /testing/marionette/index.rst + + +## --websocket-portPORT + +Port to use to connect to WebDriver BiDi. Defaults to 9222. + +A helpful trick is that it is possible to bind to 0 to get the +system to atomically assign a free port. diff --git a/doc/Notarization.md b/doc/Notarization.md index 559800d..c2b171b 100644 --- a/doc/Notarization.md +++ b/doc/Notarization.md @@ -1,23 +1,31 @@ -macOS notarization -================== +# macOS notarization With the introduction of macOS 10.15 “Catalina” Apple introduced [new notarization requirements] that all software must be signed and notarized centrally. -Whilst geckodriver is technically both signed and notarized, the -way we package geckodriver on macOS means the notarization is lost. -Mozilla considers this a known bug with the [geckodriver 0.26.0 -release] and are taking steps to resolve this. You can track the -progress in [bug 1588081]. +Whilst the geckodriver binary is technically both signed and notarized, the +actual validation can only be performed by MacOS if the machine that starts +the geckodriver binary for the very first time is online. Offline validation +would require shipping geckodriver as a DMG/PKG. You can track the relevant +progress in [bug 1783943]. + +Note: geckodriver releases between 0.26.0 and 0.31.0 don't have the +notarization applied and always require the manual steps below to +bypass the notarization requirement of the binary during the very first start. + +[new notarization requirements]: https://developer.apple.com/news/?id=04102019a +[bug 1783943]: https://bugzilla.mozilla.org/show_bug.cgi?id=1783943 + +## Offline mode There are some mitigating circumstances: - * Verification problems only occur when other notarized programs, - such as a web browser, downloads the software from the internet. +* Verification problems only occur when other notarized programs, + such as a web browser, downloads the software from the internet. - * Arbitrary software downloaded through other means, such as - curl(1) is _not_ affected by this change. +* Arbitrary software downloaded through other means, such as + curl(1) is _not_ affected by this change. In other words, if your method for fetching geckodriver on macOS is through the GitHub web UI using a web browser, the program will @@ -29,13 +37,8 @@ To bypass the notarization requirement on macOS if you have downloaded the geckodriver .tar.gz via a web browser, you can run the following command in a terminal: - % xattr -r -d com.apple.quarantine geckodriver + % xattr -r -d com.apple.quarantine geckodriver A problem with notarization will manifest itself through a security dialogue appearing, explaining that the source of the program is not trusted. - - -[new notarization requirements]: https://developer.apple.com/news/?id=04102019a -[geckodriver 0.26.0 release]: https://github.com/mozilla/geckodriver/releases/tag/v0.26.0 -[bug 1588081]: https://bugzilla.mozilla.org/show_bug.cgi?id=1588081 diff --git a/doc/Releasing.md b/doc/Releasing.md index fa34e08..10405c5 100644 --- a/doc/Releasing.md +++ b/doc/Releasing.md @@ -1,5 +1,4 @@ -Releasing geckodriver -===================== +# Releasing geckodriver Releasing geckodriver is not as easy as it once used to be when the project’s canonical home was on GitHub. Today geckodriver is hosted @@ -13,44 +12,64 @@ In any case, the steps to release geckodriver are as follows: [mozilla-central]: https://hg.mozilla.org/mozilla-central/ [Mozilla’s CI infrastructure]: https://treeherder.mozilla.org/ - -Update in-tree dependency crates --------------------------------- +## Update in-tree dependency crates geckodriver depends on a number of Rust crates that also live in -central by using relative paths: +central by using relative paths. Here an excerpt from its `Cargo.toml`: - [dependencies] - … + [dependencies] + … + marionette = { path = "./marionette" } + … mozdevice = { path = "../mozbase/rust/mozdevice" } - mozprofile = { path = "../mozbase/rust/mozprofile" } - mozrunner = { path = "../mozbase/rust/mozrunner" } - mozversion = { path = "../mozbase/rust/mozversion" } - … - webdriver = { path = "../webdriver" } + mozprofile = { path = "../mozbase/rust/mozprofile" } + mozrunner = { path = "../mozbase/rust/mozrunner" } + mozversion = { path = "../mozbase/rust/mozversion" } + … + webdriver = { path = "../webdriver" } Because we need to export the geckodriver source code to the old GitHub repository when we release, we first need to publish these -crates if they have had any changes in the interim since the last -release. If they have received no changes, you can skip them: +crates in the specified order if they have had any changes in the +interim since the last release. If they have received no changes, +you can skip them: - - `testing/mozbase/rust/mozdevice` - - `testing/mozbase/rust/mozprofile` - - `testing/mozbase/rust/mozrunner` - - `testing/mozbase/rust/mozversion` - - `testing/webdriver` +- `testing/mozbase/rust/mozdevice` +- `testing/mozbase/rust/mozprofile` +- `testing/mozbase/rust/mozrunner` +- `testing/mozbase/rust/mozversion` +- `testing/webdriver` +- `testing/geckodriver/marionette` For each crate: - 1. Bump the version number in Cargo.toml - 2. Update the crate: `cargo update -p ` - 3. Commit the changes for the modified `Cargo.toml`, and `Cargo.lock` - (can be found in the repositories root folder). Use a commit message - like `Bug XYZ - [rust-] Release version .` +1. 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. +2. Update the crate: `cargo update -p ` +3. Commit the changes for the modified `Cargo.toml`, and `Cargo.lock` + (can be found in the repositories root folder). Use a commit message + like `Bug XYZ - [rust-] Release version .` + +[semantic versioning rules]: https://semver.org/ +## Update libraries + +Make relevant changes to [Cargo.toml] to upgrade dependencies, then run + + % ./mach vendor rust + % ./mach build testing/geckodriver + +to pull down and vendor the upgraded libraries. + +The updates to dependencies should always be made as a separate +commit to not confuse reviewers, because vendoring involves checking +in a lot of extra code already reviewed downstream. +[Cargo.toml]: https://searchfox.org/mozilla-central/source/testing/geckodriver/Cargo.toml +[Cargo.lock]: https://searchfox.org/mozilla-central/source/Cargo.lock -Update the change log ---------------------- +## Update the change log Notable changes to geckodriver are mentioned in [CHANGES.md]. Many users rely on this, so it’s important that you make it **relevant @@ -61,13 +80,13 @@ If a feature was added but removed before release, there is no reason to list it as a change. It is good practice to also include relevant information from the -[webdriver], [rust-mozrunner], and [rust-mozdevice] crates, since these -are the most important dependencies of geckodriver and a lot of its -functionality is implemented there. +[webdriver], [marionette], [rust-mozrunner], and [rust-mozdevice] crates, +since these are the most important dependencies of geckodriver and a lot +of its functionality is implemented there. We follow the writing style of the existing change log, with one section per version (with a release date), with subsections -‘Added’, ‘Changed’, and ‘Removed’. If the targeted +‘Added’, ‘Changed’, 'Fixed' and ‘Removed’. If the targeted Firefox or Selenium versions have changed, it is good to make a mention of this. Lines are optimally formatted at roughly 72 columns to make the file readable in a text editor as well as rendered HTML. @@ -75,29 +94,11 @@ fmt(1) does a splendid job at text formatting. [CHANGES.md]: https://searchfox.org/mozilla-central/source/testing/geckodriver/CHANGES.md [webdriver]: https://searchfox.org/mozilla-central/source/testing/webdriver +[marionette]: https://searchfox.org/mozilla-central/source/testing/geckodriver/marionette [rust-mozrunner]: https://searchfox.org/mozilla-central/source/testing/mozbase/rust/mozrunner [rust-mozdevice]: https://searchfox.org/mozilla-central/source/testing/mozbase/rust/mozdevice -Update libraries ----------------- - -Make relevant changes to [Cargo.toml] to upgrade dependencies, then run - - % ./mach vendor rust - % ./mach build testing/geckodriver - -to pull down and vendor the upgraded libraries. - -The updates to dependencies should always be made as a separate -commit to not confuse reviewers, because vendoring involves checking -in a lot of extra code already reviewed downstream. - -[Cargo.toml]: https://searchfox.org/mozilla-central/source/testing/geckodriver/Cargo.toml -[Cargo.lock]: https://searchfox.org/mozilla-central/source/Cargo.lock - - -Bump the version number and update the support page ---------------------------------------------------- +## Bump the version number and update the support page Bump the version number in [Cargo.toml] to the next version. geckodriver follows [semantic versioning] so it’s a good idea to @@ -105,7 +106,7 @@ familiarise yourself with that before deciding on the version number. After you’ve changed the version number, run - % ./mach build testing/geckodriver + % ./mach build testing/geckodriver again to update [Cargo.lock]. @@ -117,9 +118,7 @@ Finally commit all those changes. [semantic versioning]: http://semver.org/ [support page]: https://searchfox.org/mozilla-central/source/testing/geckodriver/doc/Support.md - -Add the changeset id --------------------- +## Add the changeset id To easily allow a release build of geckodriver after cloning the repository, the changeset id for the release has to be added to the @@ -131,8 +130,7 @@ to `mozilla-central`, the changeset id from the merge commit has to picked for finalizing the change log. This specific id is needed because Taskcluster creates the final signed builds based on that merge. -Release new in-tree dependency crates -------------------------------------- +## Release new in-tree dependency crates Make sure to wait until the complete patch series from above has been merged to mozilla-central. Then continue with the following steps. @@ -149,13 +147,24 @@ and run the following command to publish the crate: Note that if a crate has an in-tree dependency make sure to first change the dependency information. +We also publish audit information for the crates, and that must be +updated for each release. To do that run: -Export to GitHub ----------------- + % ./mach cargo vet certify --force + +where `` is the name of the crate and `` is the version of the +crate that was published. + +Once the above steps are done for all published crates, create a single revision +for the supply-chain changes. + +[audit criteria]: https://mozilla.github.io/cargo-vet/audit-criteria.html + +## Export to GitHub The canonical GitHub repository is - https://github.com/mozilla/geckodriver.git + https://github.com/mozilla/geckodriver.git so make sure you have a local clone of that. It has three branches: _master_ which only contains the [README.md]; _old_ which was the @@ -170,56 +179,43 @@ on mozilla-central: Or: - % git checkout $RELEASE_REVISION + % git checkout $(git cinnabar hg2git $RELEASE_REVISION) -We will now export the contents of [testing/geckodriver] to the -_release_ branch: +We will now export the contents of [testing/geckodriver] to a new branch that +is based on the _release_ branch, which will be used to create a pull request: - % cd $SRC/geckodriver - % git checkout release + % cd $SRC/geckodriver + % git checkout release % git pull - % git rm -rf . - % git clean -fxd - % cp -rt $SRC/gecko/testing/geckodriver . + % git checkout -b do_release_X.Y.Z + % git rm -rf . + % git clean -fxd + % cp -rt $SRC/gecko/testing/geckodriver . -[README.md]: https://searchfox.org/mozilla-central/source/testing/geckodriver/README.md -[testing/geckodriver]: https://searchfox.org/mozilla-central/source/testing/geckodriver - - -Manually change in-tree path dependencies ------------------------------------------- +Now verify that geckodriver builds correctly by running: -After the source code has been imported we need to change the dependency -information for the `mozrunner`, `mozprofile`, `mozversion`, and -`webdriver` crates. As explained previously geckodriver depends -on a relative path in the mozilla-central repository to build -with the latest unreleased source code. - -This relative paths do not exist in the GitHub repository and the -build will fail unless we change it to the latest crate versions -from crates.io. That version will either be the crate you published -earlier, or the latest version available if no changes have been -made to it since the last geckodriver release. + % cargo build +[README.md]: https://searchfox.org/mozilla-central/source/testing/geckodriver/README.md +[testing/geckodriver]: https://searchfox.org/mozilla-central/source/testing/geckodriver -Commit local changes --------------------- +## Commit local changes Now commit all the changes you have made locally to the _release_ branch. It is recommended to setup a [GPG key] for signing the commit, so that the release commit is marked as `verified`. - % git add . - % git commit -S -am "import of vX.Y.Z" (signed) + % git add . -- ':!mach_commands.py :!moz.build :!target/*' + % git commit -S -am "Import of vX.Y.Z" (signed) or if you cannot use signing use: - % git add . - % git commit -am "import of vX.Y.Z" (unsigned) + % git add . -- ':!mach_commands.py :!moz.build :!target/*' + % git commit -am "Import of vX.Y.Z" (unsigned) -Then push the changes: +Then push the changes, and create a pull request: - % git push + % git push origin do_release_X.Y.Z As indicated above, the changes you make to this branch will not be upstreamed back into mozilla-central. It is merely used as a @@ -227,9 +223,7 @@ place for external consumers to build their own version of geckodriver. [GPG key]: https://help.github.com/articles/signing-commits/ - -Make the release ----------------- +## Make the release geckodriver needs to be manually released on github.com. Therefore start to [draft a new release], and make the following changes: @@ -248,9 +242,14 @@ geckodriver needs to be manually released on github.com. Therefore start to individual files so the basename looks like 'geckodriver-v%version%-%platform%'. Upload them all, including the checksum files for both the Linux platforms. +5. Before announcing the release on GitHub publish the geckodriver crate as well + on crates.io by running `cargo publish` from the release branch. + +6. Send the release announcement to the [dev-webdriver] mailing list. + [draft a new release]: https://github.com/mozilla/geckodriver/releases/new [taskcluster index]: https://firefox-ci-tc.services.mozilla.com/tasks/index/gecko.v2.mozilla-central.revision.%changeset%.geckodriver - +[dev-webdriver]: https://groups.google.com/a/mozilla.org/g/dev-webdriver Congratulations! You’ve released geckodriver! diff --git a/doc/Support.md b/doc/Support.md index 8dd42be..27bb666 100644 --- a/doc/Support.md +++ b/doc/Support.md @@ -22,6 +22,11 @@ and required versions of Selenium and Firefox: max + + 0.32.0 + ≥ 3.11 (3.14 Python) + 102 ESR + n/a 0.31.0 ≥ 3.11 (3.14 Python) diff --git a/marionette/Cargo.toml b/marionette/Cargo.toml index 034560c..98a1cc9 100644 --- a/marionette/Cargo.toml +++ b/marionette/Cargo.toml @@ -1,6 +1,10 @@ [package] name = "marionette" version = "0.2.0" +description = "Library implementing the client side of Gecko's Marionette remote automation protocol." +keywords = ["mozilla", "firefox", "marionette", "webdriver"] +repository = "https://hg.mozilla.org/mozilla-central/file/tip/testing/geckodriver/marionette" +license = "MPL-2.0" authors = ["Mozilla"] edition = "2018" diff --git a/src/browser.rs b/src/browser.rs index 306bfe1..902f7f7 100644 --- a/src/browser.rs +++ b/src/browser.rs @@ -71,6 +71,7 @@ impl LocalBrowser { options: FirefoxOptions, marionette_port: u16, jsdebugger: bool, + profile_root: Option<&Path>, ) -> WebDriverResult { let binary = options.binary.ok_or_else(|| { WebDriverError::new( @@ -87,7 +88,7 @@ impl LocalBrowser { let mut profile = match options.profile { ProfileType::Named => None, ProfileType::Path(x) => Some(x), - ProfileType::Temporary => Some(Profile::new()?), + ProfileType::Temporary => Some(Profile::new(profile_root)?), }; let (profile_path, prefs_backup) = if let Some(ref mut profile) = profile { @@ -159,10 +160,12 @@ impl LocalBrowser { } } self.process.kill()?; + // Restoring the prefs if the browser fails to stop perhaps doesn't work anyway if let Some(prefs_backup) = self.prefs_backup { prefs_backup.restore(); }; + Ok(()) } @@ -227,6 +230,7 @@ fn read_marionette_port(profile_path: &Path) -> Option { pub(crate) struct RemoteBrowser { handler: AndroidHandler, marionette_port: u16, + prefs_backup: Option, } impl RemoteBrowser { @@ -234,6 +238,7 @@ impl RemoteBrowser { options: FirefoxOptions, marionette_port: u16, websocket_port: Option, + profile_root: Option<&Path>, ) -> WebDriverResult { let android_options = options.android.unwrap(); @@ -248,10 +253,10 @@ impl RemoteBrowser { )); } ProfileType::Path(x) => (x, true), - ProfileType::Temporary => (Profile::new()?, false), + ProfileType::Temporary => (Profile::new(profile_root)?, false), }; - set_prefs( + let prefs_backup = set_prefs( handler.marionette_target_port, &mut profile, is_custom_profile, @@ -272,11 +277,18 @@ impl RemoteBrowser { Ok(RemoteBrowser { handler, marionette_port, + prefs_backup, }) } fn close(self) -> WebDriverResult<()> { self.handler.force_stop()?; + + // Restoring the prefs if the browser fails to stop perhaps doesn't work anyway + if let Some(prefs_backup) = self.prefs_backup { + prefs_backup.restore(); + }; + Ok(()) } @@ -398,7 +410,7 @@ mod tests { // several regressions related to remote.log.level. #[test] fn test_remote_log_level() { - let mut profile = Profile::new().unwrap(); + let mut profile = Profile::new(None).unwrap(); set_prefs(2828, &mut profile, false, vec![], false).ok(); let user_prefs = profile.user_prefs().unwrap(); @@ -460,7 +472,7 @@ mod tests { #[test] fn test_pref_backup() { - let mut profile = Profile::new().unwrap(); + let mut profile = Profile::new(None).unwrap(); // Create some prefs in the profile let initial_prefs = profile.user_prefs().unwrap(); diff --git a/src/capabilities.rs b/src/capabilities.rs index 97e1e28..3654cc5 100644 --- a/src/capabilities.rs +++ b/src/capabilities.rs @@ -432,7 +432,10 @@ 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(options)? { + if let Some(profile) = FirefoxOptions::load_profile( + settings.profile_root.as_ref().map(|x| x.as_path()), + options, + )? { rv.profile = ProfileType::Path(profile); } } @@ -554,7 +557,10 @@ impl FirefoxOptions { Ok(rv) } - fn load_profile(options: &Capabilities) -> WebDriverResult> { + fn load_profile( + profile_root: Option<&Path>, + options: &Capabilities, + ) -> WebDriverResult> { if let Some(profile_json) = options.get("profile") { let profile_base64 = profile_json.as_str().ok_or_else(|| { WebDriverError::new(ErrorStatus::InvalidArgument, "Profile is not a string") @@ -562,7 +568,7 @@ impl FirefoxOptions { let profile_zip = &*base64::decode(profile_base64)?; // Create an emtpy profile directory - let profile = Profile::new()?; + let profile = Profile::new(profile_root)?; unzip_buffer( profile_zip, profile diff --git a/src/command.rs b/src/command.rs index abd65f1..c011238 100644 --- a/src/command.rs +++ b/src/command.rs @@ -15,8 +15,6 @@ use webdriver::error::WebDriverResult; use webdriver::httpapi::WebDriverExtensionRoute; use webdriver::Parameters; -pub const CHROME_ELEMENT_KEY: &str = "chromeelement-9fc5-4b51-a3c8-01716eedeb04"; - pub fn extension_routes() -> Vec<(Method, &'static str, GeckoExtensionRoute)> { return vec![ ( diff --git a/src/main.rs b/src/main.rs index 115d650..7742b36 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,6 +17,7 @@ extern crate serde; extern crate serde_derive; extern crate serde_json; extern crate serde_yaml; +extern crate tempfile; extern crate url; extern crate uuid; extern crate webdriver; @@ -33,7 +34,7 @@ use std::path::PathBuf; use std::result; use std::str::FromStr; -use clap::{App, AppSettings, Arg}; +use clap::{AppSettings, Arg, Command}; macro_rules! try_opt { ($expr:expr, $err_type:expr, $err_msg:expr) => {{ @@ -233,8 +234,8 @@ fn get_allowed_origins(allow_origins: Option) -> Result, .unwrap_or_else(|| Ok(vec![])) } -fn parse_args(app: &mut App) -> ProgramResult { - let args = app.try_get_matches_from_mut(env::args())?; +fn parse_args(cmd: &mut Command) -> ProgramResult { + let args = cmd.try_get_matches_from_mut(env::args())?; if args.is_present("help") { return Ok(Operation::Help); @@ -267,6 +268,20 @@ fn parse_args(app: &mut App) -> ProgramResult { let binary = args.value_of("binary").map(PathBuf::from); + let profile_root = args.value_of("profile_root").map(PathBuf::from); + + // Try to create a temporary directory on startup to check that the directory exists and is writable + { + let tmp_dir = if let Some(ref tmp_root) = profile_root { + tempfile::tempdir_in(tmp_root) + } else { + tempfile::tempdir() + }; + if tmp_dir.is_err() { + usage!("Unable to write to temporary directory; consider --profile-root with a writeable directory") + } + } + let marionette_host = args.value_of("marionette_host").unwrap(); let marionette_port = match args.value_of("marionette_port") { Some(s) => match u16::from_str(s) { @@ -305,6 +320,7 @@ fn parse_args(app: &mut App) -> ProgramResult { let settings = MarionetteSettings { binary, + profile_root, connect_existing: args.is_present("connect_existing"), host: marionette_host.into(), port: marionette_port, @@ -324,9 +340,9 @@ fn parse_args(app: &mut App) -> ProgramResult { }) } -fn inner_main(app: &mut App) -> ProgramResult<()> { - match parse_args(app)? { - Operation::Help => print_help(app), +fn inner_main(cmd: &mut Command) -> ProgramResult<()> { + match parse_args(cmd)? { + Operation::Help => print_help(cmd), Operation::Version => print_version(), Operation::Server { @@ -365,16 +381,16 @@ fn inner_main(app: &mut App) -> ProgramResult<()> { fn main() { use std::process::exit; - let mut app = make_app(); + let mut cmd = make_command(); // use std::process:Termination when it graduates - exit(match inner_main(&mut app) { + exit(match inner_main(&mut cmd) { Ok(_) => EXIT_SUCCESS, Err(e) => { eprintln!("{}: {}", get_program_name(), e); if !e.help_included() { - print_help(&mut app); + print_help(&mut cmd); } e.exit_code() @@ -382,8 +398,8 @@ fn main() { }); } -fn make_app<'a>() -> App<'a> { - App::new(format!("geckodriver {}", build::build_info())) +fn make_command<'a>() -> Command<'a> { + Command::new(format!("geckodriver {}", build::build_info())) .setting(AppSettings::NoAutoHelp) .setting(AppSettings::NoAutoVersion) .about("WebDriver implementation for Firefox") @@ -473,6 +489,13 @@ fn make_app<'a>() -> App<'a> { .long("version") .help("Prints version and copying information"), ) + .arg( + Arg::new("profile_root") + .long("profile-root") + .takes_value(true) + .value_name("PROFILE_ROOT") + .help("Directory in which to create profiles. Defaults to the system temporary directory."), + ) .arg( Arg::new("android_storage") .long("android-storage") @@ -502,8 +525,8 @@ fn get_program_name() -> String { env::args().next().unwrap() } -fn print_help(app: &mut App) { - app.print_help().ok(); +fn print_help(cmd: &mut Command) { + cmd.print_help().ok(); println!(); } diff --git a/src/marionette.rs b/src/marionette.rs index 325cc9a..0de05f8 100644 --- a/src/marionette.rs +++ b/src/marionette.rs @@ -7,7 +7,7 @@ use crate::build; use crate::capabilities::{FirefoxCapabilities, FirefoxOptions, ProfileType}; use crate::command::{ AddonInstallParameters, AddonUninstallParameters, GeckoContextParameters, - GeckoExtensionCommand, GeckoExtensionRoute, CHROME_ELEMENT_KEY, + GeckoExtensionCommand, GeckoExtensionRoute, }; use crate::logging; use marionette_rs::common::{ @@ -81,6 +81,7 @@ struct MarionetteHandshake { #[derive(Default)] pub(crate) struct MarionetteSettings { pub(crate) binary: Option, + pub(crate) profile_root: Option, pub(crate) connect_existing: bool, pub(crate) host: String, pub(crate) port: Option, @@ -188,12 +189,14 @@ impl MarionetteHandler { options, marionette_port, websocket_port, + self.settings.profile_root.as_ref().map(|x| x.as_path()), )?) } else if !self.settings.connect_existing { Browser::Local(LocalBrowser::new( options, marionette_port, self.settings.jsdebugger, + self.settings.profile_root.as_ref().map(|x| x.as_path()), )?) } else { Browser::Existing(marionette_port) @@ -333,13 +336,12 @@ impl MarionetteSession { "Failed to convert data to an object" ); - let chrome_element = data.get(CHROME_ELEMENT_KEY); let element = data.get(ELEMENT_KEY); let frame = data.get(FRAME_KEY); let window = data.get(WINDOW_KEY); let value = try_opt!( - element.or(chrome_element).or(frame).or(window), + element.or(frame).or(window), ErrorStatus::UnknownError, "Failed to extract web element from Marionette response" );