From 5ddacf8e8131bacbcbd360b24c4c45b5380678ee Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Thu, 5 Aug 2021 20:33:14 +0200 Subject: feat: get spaces of a faculty --- src/browser/mod.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/browser/mod.rs') diff --git a/src/browser/mod.rs b/src/browser/mod.rs index 1675595..1f44493 100644 --- a/src/browser/mod.rs +++ b/src/browser/mod.rs @@ -35,6 +35,17 @@ pub async unsafe fn get_faculties() -> WebDriverResult WebDriverResult>> { + if let Some(driver) = &WEB_BROWSER { + if let Some(spaces) = driver.spaces().await? { + return Ok(Some(spaces)); + } + } + + Ok(None) +} + pub async unsafe fn select_option( klass: &str, property_name: &str, -- cgit v1.2.3-18-g5258