private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { // Must be synchronous in Window_Closing. Any await will close immediately asyncChromeDriverDev?.CloseSync(); if (asyncChromeDriver != null) { asyncChromeDriver.CloseSync(); } if (webDriver != null) { webDriver.CloseSync(); } }
private void CloseChrome() { if (asyncChromeDriver != null) { try { asyncChromeDriver.CloseSync(); } catch { } } }
private void Button_Click_16(object sender, RoutedEventArgs e) { asyncChromeDriverDev?.CloseSync(); asyncChromeDriver?.CloseSync(); }