Esempio n. 1
0
 private void GetProductFromCategory(ProductCategories category, int productNumber)
 {
     if (category == ProductCategories.Top_deals)
     {
         var blackFridayControl = m_driverForRun.FindElement(By.XPath("//div[@id='v-pills-tab']//button[text()=' Black Friday ']"));
         blackFridayControl.Click();
         Thread.Sleep(2000);
         categoryControl = m_driverForRun.FindElement(By.XPath("//div[@class='sub-menu opened']//div[@class='column ng-star-inserted']//li[1]/a"));
         categoryControl.Click();
         Thread.Sleep(3000);
     }
     else
     {
         categoryControl = m_driverForRun.FindElement(By.XPath(category.GetDescription()));
         categoryControl.Click();
         Thread.Sleep(3000);
     }
     //if (categoryControl != null)
     //{
     //Thread.Sleep(2000);
     //categoryControl.Click();
     //Thread.Sleep(3000);
     CaptureProductProperties(productNumber);
     //}
 }