diff options
author | Santo Cariotti <santo@dcariotti.me> | 2021-07-29 21:55:06 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2021-07-29 21:55:06 +0200 |
commit | ffd892ad332c994b8ed9536ff473c3037e05bc4d (patch) | |
tree | 770984504bc5e729b1e38fc9f584301893772255 /src/browser.rs | |
parent | 60af8fbaa361fc233236675c20b0489f05288a59 (diff) |
chore: use driver url as env variable
Diffstat (limited to 'src/browser.rs')
-rw-r--r-- | src/browser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/browser.rs b/src/browser.rs index de7efaf..4900f6c 100644 --- a/src/browser.rs +++ b/src/browser.rs @@ -5,8 +5,8 @@ use thirtyfour::{FirefoxCapabilities, WebDriver, WebDriverCommands}; const LOGIN_URL: &str = "https://studenti.smartedu.unict.it/WorkFlow2011/Logon/Logon.aspx"; -pub async fn init() -> WebDriver { - let driver = match WebDriver::new("http://localhost:4444", FirefoxCapabilities::new()).await { +pub async fn init(driver_url: &String) -> WebDriver { + let driver = match WebDriver::new(driver_url, FirefoxCapabilities::new()).await { Ok(driver) => driver, Err(_) => { panic!("Firefox can't be opened"); |