Exemple #1
0
 public void ClickOnResults()
 {
     if (Selenide.IsElementExists(Driver, Util.GetLocator("ResultsTable_frm")))
     {
         Selenide.SwitchToFrame(Driver, Util.GetLocator("ResultsTable_frm"));
         if (Selenide.IsElementExists(Driver, Util.GetLocator("ResultsTable1_tbl")))
         {
             Step = "Click on any store number";
             StoreSchedulerPage.ClickOnAnyStoreNumber(Driver, Reporter, resultsPath);
         }
         else if (Selenide.IsElementExists(Driver, Util.GetLocator("ResultsTable2_tbl")))
         {
             Step = "Click on any store number";
             StoreSchedulerPage.ClickOnAnyStoreNumber(Driver, Reporter, resultsPath);
         }
         if (Selenide.IsElementExists(Driver, Util.GetLocator("StoreInfoPopUp_win")))
         {
             Step = "Close store popup window";
             StoreSchedulerPage.CloseStoreLocatorPopupWindow(Driver, Reporter, resultsPath);
         }
         else
         {
             Step = "No Results Found";
             Selenide.SwitchToDefaultContent(Driver);
         }
     }
 }
Exemple #2
0
 public void ClickOnResults()
 {
     if (Selenide.IsElementExists(Driver, Util.GetLocator("ResultsTable_frm")))
     {
         try
         {
             Selenide.SwitchToFrame(Driver, Util.GetLocator("ResultsTable_frm"));
             if (Selenide.IsElementExists(Driver, Util.GetLocator("ResultsTable1_tbl")))
             {
                 Step = "Click on any store number";
                 StoreSchedulerPage.ClickOnAnyStoreNumber(Driver, Reporter);
             }
             else if (Selenide.IsElementExists(Driver, Util.GetLocator("ResultsTable2_tbl")))
             {
                 Step = "Click on any store number";
                 StoreSchedulerPage.ClickOnAnyStoreNumber(Driver, Reporter);
             }
             if (Selenide.IsElementExists(Driver, Util.GetLocator("StoreInfoPopUp_win")))
             {
                 Step = "Close store popup window";
                 StoreSchedulerPage.CloseStoreLocatorPopupWindow(Driver, Reporter);
             }
             else
             {
                 Step = "No Results Found";
                 Selenide.SwitchToDefaultContent(Driver);
             }
         }
         catch (Exception ex)
         {
             CommonPage.AcceptOrDissmissAlertIfPresent(Driver, Reporter);
             CommonPage.AcceptErrorMessageIfPresent(Driver);
             CommonPage.CloseBrowserNewTab(Driver);
         }
     }
 }