示例#1
0
 public void SetUp()
 {           
     DataPersister<GeneralConfig> cfgHelper = new DataPersister<GeneralConfig>();
                 
     if (cfgHelper.FileExist(GeneralConfig.DEFAULT_FILE_NAME))
     {
         Config =  cfgHelper.Load(GeneralConfig.DEFAULT_FILE_NAME);
     }
     else
     {
         Config = GeneralConfig.CreateDefault();
         cfgHelper.Save(Config, GeneralConfig.DEFAULT_FILE_NAME);
     }
     
     // think about muti-browser support
     WebDriver = new ChromeDriver();
     
     // configure default timeouts
     WebDriver.Manage().Timeouts().SetPageLoadTimeout(TimeSpan.FromSeconds(Config.DefaultTimeoutSec));
 }