public void SetTimeout(int Sec) { try { driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); } catch (Exception e) { log.Error().WriteLine("Bbase::SetTimeout() exception raised [" + e.Message + "]"); } }
public void test() { try { SeleniumLog log = SeleniumLog.Instance(); //ApiField.Click(); //log.WriteLine("Field default text [" + ApiField.GetAttribute("placeholder") + "]"); //ApiField.SendKeys("test"); //SearchField.SendKeys("Toyota"); //SearchButton.Click(); //log.WriteLine("Ad count [" + AdsList.Count + "]"); //log.WriteLine("Sleep 3 seconds"); //Thread.Sleep(3000); //log.WriteLine("Finished sleeping"); //ScrollIntoView(ResultsCount); log.WriteLine("end test"); } catch (Exception e) { SeleniumLog log = SeleniumLog.Instance(); log.Error().WriteLine("Exception: " + e.Message); } }
public void Message(string msg) { try { SeleniumLog log = SeleniumLog.Instance(); log.WriteLine(string.Format("TestClass :: Message :: {0}", msg)); } catch (Exception e) { SeleniumLog log = SeleniumLog.Instance(); log.Error().WriteLine(string.Format("TestClass :: Exception :: {0}", e.Message)); } }