From 7efbd2d8f62e5a168416898a2b180b00d3ce2caa Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 23 Dec 2020 01:50:55 +0000 Subject: [PATCH] well maybe it starts ff ? Signed-off-by: Ian Jackson --- wdriver.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wdriver.rs b/wdriver.rs index a0929bed..9d19e47d 100644 --- a/wdriver.rs +++ b/wdriver.rs @@ -5,8 +5,11 @@ pub use anyhow::{anyhow, Context}; pub use fehler::{throw, throws}; pub use structopt::StructOpt; +pub use thirtyfour_sync as t4; pub use void::Void; +pub use t4::WebDriverCommands; + pub use std::env; pub use std::fs; pub use std::io::{BufRead, BufReader, ErrorKind, Write}; @@ -280,6 +283,15 @@ fn prepare_geckodriver(cln: &cleanup_notify::Handle) { } } +#[throws(AE)] +fn prepare_thirtyfour() { + let caps = t4::DesiredCapabilities::firefox(); + let driver = t4::WebDriver::new("http://localhost:4444", &caps) + .context("create 34 WebDriver")?; + driver.get("http://localhost:8000") + .context("dummy navigation")?; +} + #[throws(AE)] pub fn setup() -> Setup { let current_exe : String = env::current_exe() @@ -300,6 +312,7 @@ pub fn setup() -> Setup { prepare_xserver(&cln).context("setup X server")?; prepare_geckodriver(&cln).context("setup webdriver serverr")?; + prepare_thirtyfour().context("prepare web session")?; Setup { tmp, -- 2.30.2