Ejemplo n.º 1
0
        public void OpenFirstTenResultsAndGenerateLinksToGoogleMaps()
        {
            HomePage           homePage           = new HomePage(_driver);
            SearchPage         searchPage         = new SearchPage(_driver);
            AdvancedSearchPage advancedSearchPage = new AdvancedSearchPage(_driver);
            SearchResultsPage  searchResultsPage  = new SearchResultsPage(_driver);
            ResultDetailsPage  resultDetailsPage  = new ResultDetailsPage(_driver);

            homePage.clickSearchButton();
            searchPage.clickConsentButton();
            searchPage.clickAdvancedSearchButton();

            Assert.IsTrue(advancedSearchPage.isAdvancedSearchHeadingDisplayed());

            advancedSearchPage.searchForTown("Ale");

            Debug.WriteLine(_driver.Title);
            Assert.AreEqual <string>("Free Zip Code Finder and Lookup", _driver.Title);

            string[] urls = searchResultsPage.getResultsUrls();
            for (int i = 0; i < 10; i++)
            {
                _driver.Navigate().GoToUrl(urls[i]);

                string city      = resultDetailsPage.getCity();
                string state     = resultDetailsPage.getState();
                string zipCode   = resultDetailsPage.getZipCode();
                string longitude = resultDetailsPage.getLongitude();
                string latitude  = resultDetailsPage.getLatitude();

                googleMapsUrls[i] = $"https://www.google.com/maps/place/{latitude}+{longitude}";

                Debug.WriteLine($"City: {city}, State: {state}, Zip Code: {zipCode}, Longitude: {longitude}, Latitude: {latitude}, Google Maps URL: {googleMapsUrls[i]}");
            }
        }
Ejemplo n.º 2
0
        public void AddNewLeadButtonTestForTechnician()
        {
            DashboardPage      dashboard        = GetPage <DashboardPage>(Roles.Technician);
            AdvancedSearchPage objAdvanceSearch = dashboard.GetAdvancedSearchPage();

            objAdvanceSearch.EnterWTN("2177683648.0");
            objAdvanceSearch.Submit();
        }
        public void TestSearchbyWTN()
        {
            IHDPage            dashboard        = GetPage <IHDPage>(Roles.Technician);
            AdvancedSearchPage objAdvanceSearch = dashboard.AdvancedSearchPage();

            objAdvanceSearch.Submit();
            objAdvanceSearch.Continue();
        }
Ejemplo n.º 4
0
        public void AdvancedSearch()
        {
            KinopoiskHomePage  homePage           = new KinopoiskHomePage(ConciseApi);
            AdvancedSearchPage advancedSearchPage = homePage.GoToAdvancedSearchPage();
            PageWithResults    pageWithResults    = advancedSearchPage.SearchByNameAndCountry("Зеленая миля", "США");

            Assert.AreEqual("Зеленая миля", pageWithResults.GetFirstResultTitle());
        }
Ejemplo n.º 5
0
        public void SearchbyWTNTest(Roles role, string WTN)
        {
            DashboardPage      dashboard        = GetPage <DashboardPage>(role);
            AdvancedSearchPage objAdvanceSearch = dashboard.GetAdvancedSearchPage().EnterWTN(WTN).Submit();

            Thread.Sleep(90000);
            IWebElement searchResultsGrid = objAdvanceSearch.GetSearchResultElement();

            Assert.NotNull(searchResultsGrid, "Results are displayed in the grid");
        }
Ejemplo n.º 6
0
        public void AdvancedPositive(string name)
        {
            var page = new AdvancedSearchPage(driver);

            page.GoToAdvancedSearch(name);
            page.ExpandSearch();
            page.SetDate(1);//from 0 to 5
            page.SetContentType(false, false);
            page.FillRow(1, "All Fields", "Video");
            page.SearchButton.Click();
            Assert.True(page.GetResult() != "0 results");
        }
Ejemplo n.º 7
0
        public static void ClassInitialize(TestContext testContext)
        {
            CreateScreenshotsDirectory();

            _driver = new WebDriver();
            _driver.Start(Browser.Chrome);

            _homePage                  = new HomePage(_driver);
            _searchpage                = new SearchPage(_driver);
            _advancedSearchPage        = new AdvancedSearchPage(_driver);
            _advancedSearchResultsPage = new AdvancedSearchResultsPage(_driver);
            _infoPage                  = new InfoPage(_driver);
        }
Ejemplo n.º 8
0
 public void TestJournals(Journals journ)
 {
     journPage.GoToTheJournal(journ.journalName, driverForJournals /*.getInstance(TestData.browser)*/);
     Assert.False(driverForJournals /*.getInstance(TestData.browser)*/.Url.Contains("PageNotFoundError"), "There is no journal named " + journ.journalName);
     journPage.SearchAndGo(driverForJournals /*.getInstance(TestData.browser)*/);
     accumulator.Accumulate(() => Assert.True(SearchPage.CheckSearch(driverForJournals /*.getInstance(TestData.browser)*/), "No results"));
     journPage.GoToTheAdvancedSearch(driverForJournals /*.getInstance(TestData.browser)*/);
     AdvancedSearchPage.MakeSearch(driverForJournals /*.getInstance(TestData.browser)*/);
     accumulator.Accumulate(() => Assert.False(AdvancedSearchPage.CheckSearch(driverForJournals /*.getInstance(TestData.browser)*/), "No results"));
     journPage.GoToTheJournal(journ.journalName, driverForJournals /*.getInstance(TestData.browser)*/);
     journPage.CheckEverythingForExist(journ, driverForJournals /*.getInstance(TestData.browser)*/);
     accumulator.Release();
 }
Ejemplo n.º 9
0
        public void OpenGoogleMapLinksAndTakeAndSaveScreenshots()
        {
            HomePage           homePage           = new HomePage(_driver);
            SearchPage         searchPage         = new SearchPage(_driver);
            AdvancedSearchPage advancedSearchPage = new AdvancedSearchPage(_driver);
            SearchResultsPage  searchResultsPage  = new SearchResultsPage(_driver);
            ResultDetailsPage  resultDetailsPage  = new ResultDetailsPage(_driver);

            homePage.clickSearchButton();
            searchPage.clickConsentButton();
            searchPage.clickAdvancedSearchButton();

            Assert.IsTrue(advancedSearchPage.isAdvancedSearchHeadingDisplayed());

            advancedSearchPage.searchForTown("Ale");

            Debug.WriteLine(_driver.Title);
            Assert.AreEqual <string>("Free Zip Code Finder and Lookup", _driver.Title);

            string[] urls = searchResultsPage.getResultsUrls();
            for (int i = 0; i < 10; i++)
            {
                _driver.Navigate().GoToUrl(urls[i]);

                string city      = resultDetailsPage.getCity();
                string state     = resultDetailsPage.getState();
                string zipCode   = resultDetailsPage.getZipCode();
                string longitude = resultDetailsPage.getLongitude();
                string latitude  = resultDetailsPage.getLatitude();

                googleMapsUrls[i] = $"https://www.google.com/maps/place/{latitude}+{longitude}";

                Debug.WriteLine($"City: {city}, State: {state}, Zip Code: {zipCode}, Longitude: {longitude}, Latitude: {latitude}, Google Maps URL: {googleMapsUrls[i]}");

                _driver.Navigate().GoToUrl(googleMapsUrls[i]);

                GoogleMapsPage googleMapsPage = new GoogleMapsPage(_driver);
                if (i == 0)
                {
                    googleMapsPage.waitToLoadAndClickAccept();
                }

                string filename = $"{city}-{state}-{zipCode}.{ScreenshotImageFormat.Png}";
                string fullPath = Path.Combine(Path.GetTempPath(), filename);
                Debug.WriteLine(fullPath);
                TakeFullScreenshot(_driver, fullPath);

                Assert.IsTrue(File.Exists(fullPath), "The screenshot map file was not found.");
            }
        }
 public UsedCarsCatelogueSteps(
     IWebDriver webDriver,
     ICatelogue catelogueHttpClient,
     AdvancedSearchPage advancedSearchPage,
     MortorsPage mortorsPage,
     SearchResultsPage searchResultsPage,
     ContextObjectInitializer contextObjectInitializer)
     : base(webDriver)
 {
     _advancedSearchPage       = advancedSearchPage;
     _mortorsPage              = mortorsPage;
     _searchResultsPage        = searchResultsPage;
     _contextObjectInitializer = contextObjectInitializer;
     _catelogueHttpClient      = catelogueHttpClient;
 }
        public void TC12498_UserValidationFailed(Roles role, List <string> dataset)
        {
            string        BTN       = dataset[1];
            DashboardPage dashboard = GetPage <DashboardPage>(role);

            Assert.IsTrue(ValidateCurrentPageTitle(DashboardPage.Title), "Failed to load Dashboard page");

            AdvancedSearchPage   advanceSearch = dashboard.ClickOnAdvancedSearch();
            ValidationSearchPage validate      = advanceSearch.EnterBTN(BTN).Submit().SelectUserWithValue(BTN).Continue();

            AdvancedSearchPage advSearch = validate.ValidationFailed();

            Assert.AreEqual(ElementIsPresent(advanceSearch.SearchResultTable), true);
            Assert.AreEqual(ValidateCurrentPageTitle(AdvancedSearchPage.Title), true, "Failed to load Search Page");
        }
        public void TC12512_CustomerSummaryForUserBTN(Roles role, List <string> dataset)
        {
            string        BTN       = dataset[1];
            DashboardPage dashboard = GetPage <DashboardPage>(role);

            Assert.IsTrue(ValidateCurrentPageTitle(DashboardPage.Title), "Failed to load Dashboard page");

            AdvancedSearchPage advanceSearch = dashboard.ClickOnAdvancedSearch();

            ValidationSearchPage validate = advanceSearch.EnterBTN(BTN).Submit().SelectUserWithValue(BTN).Continue();

            Assert.AreEqual(ElementIsPresent(validate.CustomerSummaryTable), true);

            // ToDo - Customer Summary data check after RESI is live
        }
Ejemplo n.º 13
0
 private void AdvancedSearch_Click(object sender, RoutedEventArgs e)
 {
     App app = (App)Application.Current;
     AdvancedSearchPage asp = new AdvancedSearchPage();
     if (RecordsSearchFunctions.isContentSearchable(SearchContentTextBox.Text) == true)
     {
         asp.AllOfTheWords_Content.Text = SearchContentTextBox.Text.TrimStart().TrimEnd();
         Dispatcher.BeginInvoke(() =>
         {
             asp.AllOfTheWords_Content.SelectAll();
             asp.AllOfTheWords_Content.Focus();
         });
     }
     App.Navigate(asp);
 }
        public void TC12482_ByPassValidationForUser(Roles role, List <string> dataset)
        {
            string BTN    = dataset[2];
            string Reason = dataset[1];

            DashboardPage dashboard = GetPage <DashboardPage>(role);

            Assert.IsTrue(ValidateCurrentPageTitle(DashboardPage.Title), "Failed to load Dashboard page");

            AdvancedSearchPage   advanceSearch = dashboard.ClickOnAdvancedSearch();
            ValidationSearchPage validate      = advanceSearch.EnterBTN(BTN).Submit().SelectUserWithValue(BTN).Continue();

            Customer360Page customer360 = validate.ByPassValidation(Reason);

            Assert.IsTrue(ValidateCurrentPageTitle(Customer360Page.Title), "Failed to load Customer 360 Page");
        }
Ejemplo n.º 15
0
        public void OpenAdvancedSearchAndSearchForTown()
        {
            HomePage           homePage           = new HomePage(_driver);
            SearchPage         searchPage         = new SearchPage(_driver);
            AdvancedSearchPage advancedSearchPage = new AdvancedSearchPage(_driver);

            homePage.clickSearchButton();
            searchPage.clickConsentButton();
            searchPage.clickAdvancedSearchButton();

            Assert.IsTrue(advancedSearchPage.isAdvancedSearchHeadingDisplayed());

            advancedSearchPage.searchForTown("Ale");

            Debug.WriteLine(_driver.Title);
            Assert.AreEqual <string>("Free Zip Code Finder and Lookup", _driver.Title);
        }
        public void TC12333_SearchByBTNWithDifferentDigits(Roles role, List <string> dataset)
        {
            string BTN = dataset[1];
            // Step 1. Access to IHD URL @URL
            // Step 2. Login as role @Role and Open IHD
            DashboardPage dashboard = GetPage <DashboardPage>(role);

            Assert.IsTrue(ValidateCurrentPageTitle(DashboardPage.Title), "Failed to load Dashboard page");

            // Step 3. Click on Advanced Search button on IHD
            AdvancedSearchPage advanceSearch = dashboard.ClickOnAdvancedSearch();

            Assert.IsTrue(ValidateCurrentPageTitle(AdvancedSearchPage.Title), "Search window is not displayed");

            //Search a customer @customer, enter BTN @BTN in the BTN field
            //Click on Search button
            advanceSearch = advanceSearch.EnterBTN(BTN).Submit();

            //Expected Result : Results are displayed in the grid
            Assert.AreEqual(ElementIsPresent(advanceSearch.SearchResultTable), true, "Users with BTN " + BTN + " displayed in Advance Search Page Table");
        }
Ejemplo n.º 17
0
        public void Events_02_AdvancedSearch()
        {
            UiTest(() =>
            {
                _eventsPage = _myProfilePage.NavigateToEventsPage();

                _advancedSearchPage = _eventsPage.ClickAdvancedSearch();

                _advancedSearchPage.TypeInDateFrom(string.Format("{0:d}", DateTime.Now.AddYears(-1)));
                _advancedSearchPage.TypeInDateTo(string.Format("{0:d}", DateTime.Now.AddYears(1)));

                _advancedSearchPage.ChooseCategoriesAndRegions(new IWebElement[] { _advancedSearchPage.ConnectionsChb, _advancedSearchPage.ReliabilityChb, _advancedSearchPage.EnvironmentChb,
                                                                                   _advancedSearchPage.EnglandChb });

                _advancedSearchPage.ClickSearch();
                Assert.That(_advancedSearchPage.EventNameTx.Displayed);
                Assert.That(_advancedSearchPage.EventDateTx.Displayed);
                Assert.That(_advancedSearchPage.EventDescriptionTx.Displayed);
                Assert.That(_advancedSearchPage.ContactOrganiserBtn.Displayed);
                Assert.That(_advancedSearchPage.ContactOrganiserBtn.Enabled);
            });
        }
Ejemplo n.º 18
0
        public void Events_01_EventsCalendar()
        {
            UiTest(() =>
            {
                _eventsPage = _myProfilePage.NavigateToEventsPage();

                Assert.That(_eventsPage.Calendar.Displayed);
                Assert.That(_eventsPage.Calendar.Enabled);

                _eventsPage.ClickFutureEvent();
                Assert.That(_eventsPage.GetStartDate().Displayed);
                Assert.That(_eventsPage.GetStartDate().Text, Is.Not.Empty);

                _eventRegisterationPage = _eventsPage.ClickRegisterNow();
                Assert.That(_eventRegisterationPage.RegisterYourDetailsTx.Displayed);

                driver.Navigate().Back();
                _advancedSearchPage = _eventsPage.ClickAdvancedSearch();
                Assert.That(_advancedSearchPage.SearchResultsTx.Displayed);

                driver.Navigate().Back();
                Assert.That(_eventsPage.Calendar.Displayed);
            });
        }
Ejemplo n.º 19
0
 public void GivenIGoToAdvancedSearchPage()
 {
     _advancedSearchPage = _homePage.GoToAdvancedSearchPage();
     _scenarioContext.Add(typeof(AdvancedSearchPage).ToString(), _advancedSearchPage);
 }
Ejemplo n.º 20
0
 public AdvancedSearchStep(ScenarioContext scenarioContext)
 {
     _scenarioContext    = scenarioContext;
     _advancedSearchPage = _scenarioContext.Get <AdvancedSearchPage>(typeof(AdvancedSearchPage).ToString());
 }