/// <summary> /// <para>Top saling test</para> /// </summary> public void TopSalling() { ChromeOptions options = new ChromeOptions(); options.PageLoadStrategy = PageLoadStrategy.None; using (ChromeDriver dr = new ChromeDriver(Directory.GetCurrentDirectory(), options)) { SuperPage.phones = new Phone[144]; HelpClass helper = new HelpClass(); var mainPage = new MainPage(dr); mainPage.GoToMainPage(); try { mainPage.CloseAdvertasing(); } catch { } var searchPage1 = mainPage.GoToTheSearchPhones(); searchPage1.FindAndWriteTopPhones(); var searchPage2 = searchPage1.GoToSecondPage(); searchPage2.FindAndWriteTopPhones(); var searchPage3 = searchPage2.GoToThirdPage(); searchPage3.FindAndWriteTopPhones(); AliGoods[] aliGoods = new AliGoods[SuperPage.countPhone]; helper.ConverterStructGoodsToClass(aliGoods); aliGoods.Clone(); MsSql msSql = new MsSql(); msSql.ClearTable("aligoods"); msSql.AddRange(aliGoods); ArrayList getsFromDataBase = new ArrayList(); getsFromDataBase = msSql.GetAll("aliGoods"); int countphone = 0; foreach (AliGoods element in getsFromDataBase) { Assert.IsTrue(element.EqualsGoods(aliGoods[countphone++])); } msSql.CloseAllConnections(); } }