From: Ian Jackson Date: Wed, 21 Jul 2021 18:16:57 +0000 (+0100) Subject: autolower: Prep for test by raising the hand we are about to claim X-Git-Tag: otter-0.7.2~12 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a99569acc8acbbdadb8b2ab38b7dfa1fce3c65b0;p=otter.git autolower: Prep for test by raising the hand we are about to claim Signed-off-by: Ian Jackson --- diff --git a/wdriver/wdt-hand.rs b/wdriver/wdt-hand.rs index 56d417cb..631d8f72 100644 --- a/wdriver/wdt-hand.rs +++ b/wdriver/wdt-hand.rs @@ -53,14 +53,25 @@ impl Ctx { w.synch()?; let hand = w.find_piece(HAND)?; + let hand_pieceid = hand.pieceid.to_string(); + let hand_posg = hand.posg()?; w.action_chain() .move_pos(&hand)? + .send_keys("W") + .click() + .send_keys("tW") .click() .perform() .did("select hand")?; w.synch()?; + let top = w.execute_script(&format!(r##" + return defs_marker.previousElementSibling.dataset.piece; + "##))?; + assert_eq!( top.value().as_str().unwrap(), + hand_pieceid ); + w.action_chain() .send_keys('C') .perform()