From 9c0497bc49460c899e12f277baf606e533b6fcb8 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 30 Dec 2020 12:50:36 +0000 Subject: [PATCH] drag claims to work but problems with log capture Signed-off-by: Ian Jackson --- wdriver.rs | 1 + wdriver/wdt-simple.rs | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/wdriver.rs b/wdriver.rs index 72e019f6..4cd4f438 100644 --- a/wdriver.rs +++ b/wdriver.rs @@ -22,6 +22,7 @@ pub use thirtyfour_sync as t4; pub use void::Void; pub use t4::WebDriverCommands; +pub use t4::By; pub use std::env; pub use std::fmt::{self, Debug}; diff --git a/wdriver/wdt-simple.rs b/wdriver/wdt-simple.rs index d7e55e1f..956510df 100644 --- a/wdriver/wdt-simple.rs +++ b/wdriver/wdt-simple.rs @@ -16,7 +16,20 @@ fn main(){ su.setup_static_users(&inst)?.try_into().unwrap(); debug!("ok {:?} {:?}", alice, bob); - su.w(&alice)?.synch()?; + { + let mut w = su.w(&alice)?; + w.synch()?; + let p1 = w.find_element(By::Id("use1.1"))?; + let p2 = w.find_element(By::Id("use2.1"))?; + + w.action_chain() + .move_to_element_center(&p1) + .click_and_hold() + .move_to_element_with_offset(&p2, 5, 10) + .release() + .perform() + .always_context("drag")?; + } debug!("finishing"); } -- 2.30.2