From: Ian Jackson Date: Wed, 30 Dec 2020 12:50:36 +0000 (+0000) Subject: drag claims to work but problems with log capture X-Git-Tag: otter-0.2.0~71 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=9c0497bc49460c899e12f277baf606e533b6fcb8;p=otter.git drag claims to work but problems with log capture Signed-off-by: Ian Jackson --- 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"); }