mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Update webdriver to 0.51 (#34838)
Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
parent
bcad0d50e9
commit
dd9164f49a
3 changed files with 17 additions and 21 deletions
21
Cargo.lock
generated
21
Cargo.lock
generated
|
@ -957,7 +957,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
|
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1862,7 +1862,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
|
checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"windows-sys 0.52.0",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2383,7 +2383,7 @@ dependencies = [
|
||||||
"gobject-sys",
|
"gobject-sys",
|
||||||
"libc",
|
"libc",
|
||||||
"system-deps",
|
"system-deps",
|
||||||
"windows-sys 0.52.0",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -4048,7 +4048,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
|
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"windows-targets 0.48.5",
|
"windows-targets 0.52.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -5888,7 +5888,7 @@ dependencies = [
|
||||||
"errno",
|
"errno",
|
||||||
"libc",
|
"libc",
|
||||||
"linux-raw-sys",
|
"linux-raw-sys",
|
||||||
"windows-sys 0.52.0",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -7153,7 +7153,7 @@ dependencies = [
|
||||||
"getrandom",
|
"getrandom",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"rustix",
|
"rustix",
|
||||||
"windows-sys 0.52.0",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -8158,22 +8158,23 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webdriver"
|
name = "webdriver"
|
||||||
version = "0.49.0"
|
version = "0.51.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bc8773336cf1ad6ffadae7d73fea436e5c4d6345a467292902876cb0f7b72107"
|
checksum = "310ce9d3648c5ff1915ca7dd09c44eabb7eb17f9ff4a6e7e5f4a902c8d1e269f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.21.7",
|
"base64 0.21.7",
|
||||||
"bytes",
|
"bytes",
|
||||||
"cookie 0.16.2",
|
"cookie 0.16.2",
|
||||||
"http",
|
"http",
|
||||||
|
"icu_segmenter",
|
||||||
"log",
|
"log",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
"thiserror 1.0.69",
|
||||||
"time 0.3.36",
|
"time 0.3.36",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-stream",
|
"tokio-stream",
|
||||||
"unicode-segmentation",
|
|
||||||
"url",
|
"url",
|
||||||
"warp",
|
"warp",
|
||||||
]
|
]
|
||||||
|
@ -8444,7 +8445,7 @@ version = "0.1.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -148,7 +148,7 @@ unicode-script = "0.5"
|
||||||
unicode-segmentation = "1.12.0"
|
unicode-segmentation = "1.12.0"
|
||||||
url = "2.5"
|
url = "2.5"
|
||||||
uuid = { version = "1.11.0", features = ["v4"] }
|
uuid = { version = "1.11.0", features = ["v4"] }
|
||||||
webdriver = "0.49.0"
|
webdriver = "0.51.0"
|
||||||
webpki-roots = "0.25"
|
webpki-roots = "0.25"
|
||||||
webrender = { git = "https://github.com/servo/webrender", branch = "0.65", features = ["capture"] }
|
webrender = { git = "https://github.com/servo/webrender", branch = "0.65", features = ["capture"] }
|
||||||
webrender_api = { git = "https://github.com/servo/webrender", branch = "0.65" }
|
webrender_api = { git = "https://github.com/servo/webrender", branch = "0.65" }
|
||||||
|
|
|
@ -50,7 +50,7 @@ use webdriver::actions::{
|
||||||
ActionSequence, PointerDownAction, PointerMoveAction, PointerOrigin, PointerType,
|
ActionSequence, PointerDownAction, PointerMoveAction, PointerOrigin, PointerType,
|
||||||
PointerUpAction,
|
PointerUpAction,
|
||||||
};
|
};
|
||||||
use webdriver::capabilities::{Capabilities, CapabilitiesMatching};
|
use webdriver::capabilities::CapabilitiesMatching;
|
||||||
use webdriver::command::{
|
use webdriver::command::{
|
||||||
ActionsParameters, AddCookieParameters, GetParameters, JavascriptCommandParameters,
|
ActionsParameters, AddCookieParameters, GetParameters, JavascriptCommandParameters,
|
||||||
LocatorParameters, NewSessionParameters, NewWindowParameters, SendKeysParameters,
|
LocatorParameters, NewSessionParameters, NewWindowParameters, SendKeysParameters,
|
||||||
|
@ -477,12 +477,7 @@ impl Handler {
|
||||||
parameters: &NewSessionParameters,
|
parameters: &NewSessionParameters,
|
||||||
) -> WebDriverResult<WebDriverResponse> {
|
) -> WebDriverResult<WebDriverResponse> {
|
||||||
let mut servo_capabilities = ServoCapabilities::new();
|
let mut servo_capabilities = ServoCapabilities::new();
|
||||||
let processed_capabilities = match parameters {
|
let processed_capabilities = parameters.match_browser(&mut servo_capabilities)?;
|
||||||
NewSessionParameters::Legacy(_) => Some(Capabilities::new()),
|
|
||||||
NewSessionParameters::Spec(capabilities) => {
|
|
||||||
capabilities.match_browser(&mut servo_capabilities)?
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
if self.session.is_none() {
|
if self.session.is_none() {
|
||||||
match processed_capabilities {
|
match processed_capabilities {
|
||||||
|
@ -979,14 +974,14 @@ impl Handler {
|
||||||
) -> WebDriverResult<WebDriverResponse> {
|
) -> WebDriverResult<WebDriverResponse> {
|
||||||
use webdriver::common::FrameId;
|
use webdriver::common::FrameId;
|
||||||
let frame_id = match parameters.id {
|
let frame_id = match parameters.id {
|
||||||
None => {
|
FrameId::Top => {
|
||||||
let session = self.session_mut()?;
|
let session = self.session_mut()?;
|
||||||
session.browsing_context_id =
|
session.browsing_context_id =
|
||||||
BrowsingContextId::from(session.top_level_browsing_context_id);
|
BrowsingContextId::from(session.top_level_browsing_context_id);
|
||||||
return Ok(WebDriverResponse::Void);
|
return Ok(WebDriverResponse::Void);
|
||||||
},
|
},
|
||||||
Some(FrameId::Short(ref x)) => WebDriverFrameId::Short(*x),
|
FrameId::Short(ref x) => WebDriverFrameId::Short(*x),
|
||||||
Some(FrameId::Element(ref x)) => WebDriverFrameId::Element(x.to_string()),
|
FrameId::Element(ref x) => WebDriverFrameId::Element(x.to_string()),
|
||||||
};
|
};
|
||||||
|
|
||||||
self.switch_to_frame(frame_id)
|
self.switch_to_frame(frame_id)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue