Task<bool?> check = Task<bool?>.Run(() => check_()); //set variable to the returned boolean of the check function. bool? working = await check; else if (working == false) { // driver.Manage().Cookies.DeleteAllCookies(); Console.ForegroundColor = ConsoleColor.DarkYellow; Console.WriteLine(user[0] + " " + user[1] + "is not working"); Console.ResetColor(); Console.WriteLine("false"); //this part is not working try { driver.FindElement(By.XPath("//*//*[@id=\"ember43\"]")).SendKeys(OpenQA.Selenium.Keys.Enter); listBox3.Items.Add(item); } catch (NoSuchElementException) { Console.ForegroundColor = ConsoleColor.Blue; driver.Navigate().Refresh(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)