Update: Bumped webdriver version to 0.48

This commit is contained in:
michaelgrigoryan25 2023-05-18 13:48:19 +04:00
parent c7f8a6ecb5
commit 4aa8a1c418
4 changed files with 159 additions and 197 deletions

View file

@ -77,6 +77,7 @@ fn compute_tick_duration(tick_actions: &ActionSequence) -> u64 {
}
},
ActionsType::Key { actions: _ } => (),
ActionsType::Wheel { actions } => todo!("Not implemented."),
}
duration
}
@ -188,6 +189,7 @@ impl Handler {
}
}
},
ActionsType::Wheel { actions } => todo!("Not implemented."),
}
Ok(())
@ -282,6 +284,7 @@ impl Handler {
actions: vec![PointerActionItem::Pointer(PointerAction::Up(
PointerUpAction {
button: action.button,
..Default::default()
},
))],
},
@ -328,6 +331,7 @@ impl Handler {
actions: vec![PointerActionItem::Pointer(PointerAction::Down(
PointerDownAction {
button: action.button,
..Default::default()
},
))],
},
@ -356,8 +360,8 @@ impl Handler {
let tick_start = Instant::now();
// Steps 1 - 2
let x_offset = action.x.unwrap_or(0);
let y_offset = action.y.unwrap_or(0);
let x_offset = action.x;
let y_offset = action.y;
// Steps 3 - 4
let (start_x, start_y) = match self

View file

@ -115,8 +115,9 @@ pub fn start_server(port: u16, constellation_chan: Sender<ConstellationMsg>) {
.spawn(move || {
let address = SocketAddrV4::new("0.0.0.0".parse().unwrap(), port);
match server::start(
"localhost".to_owned(),
SocketAddr::V4(address),
vec![],
vec![],
handler,
extension_routes(),
) {
@ -1510,15 +1511,22 @@ impl Handler {
let pointer_move_action = PointerMoveAction {
duration: None,
origin: PointerOrigin::Element(WebElement(element_id)),
x: Some(0),
y: Some(0),
x: 0,
y: 0,
..Default::default()
};
// Steps 8.7 - 8.8
let pointer_down_action = PointerDownAction { button: 1 };
let pointer_down_action = PointerDownAction {
button: 1,
..Default::default()
};
// Steps 8.9 - 8.10
let pointer_up_action = PointerUpAction { button: 1 };
let pointer_up_action = PointerUpAction {
button: 1,
..Default::default()
};
// Step 8.11
if let Err(error) =