public void Search_AdvancedSearch_for_Employees_Route_as_RoutingOnly() { // page objects var employeeAdvancedSearchPage = new EmployeeAdvancedSearchPage(Driver); // workflows var loginWorkflow = new LoginWorkflows(Driver); try { loginWorkflow.LoginAsRoutingUser(); test.Log(LogStatus.Info, "Log in as routing user"); var empSearchUrl = $"{Driver.Url}?Destination=AdvancedEmpSearch"; Driver.Navigate().GoToUrl(empSearchUrl); test.Log(LogStatus.Info, $"Navigate to {empSearchUrl}"); _commonActions.SwitchToMainContentsIFrame(); Assert.IsTrue(employeeAdvancedSearchPage.IsDisplayed(), "The Employee Advanced Search page did not open"); test.Log(LogStatus.Pass, "The Advanced Search page for Employees opens"); } catch (Exception e) { HandleException(e, Driver); throw; } }
public void Search_RoutingUser_Can_Search_for_Applicants() { // page objects var toolbar = ToolbarFactory.Get(Driver); // workflows var loginWorkflow = new LoginWorkflows(Driver); try { loginWorkflow.LoginAsRoutingUser(); test.Log(LogStatus.Pass, "Log in as a routing user"); toolbar.ClickSearch(); test.Log(LogStatus.Pass, "Click inside the search box"); Assert.IsTrue(toolbar.SearchPage.IsDisplayed(), "The search is not displayed"); test.Log(LogStatus.Pass, "The search is displayed"); // Enter in a search that should find something toolbar.SearchPage.EnterSearchText("1"); Assert.IsTrue(toolbar.SearchPage.ApplicantsAreDisplayed(), "The applicant results are not displayed"); test.Log(LogStatus.Pass, "The applicant results are displayed"); } catch (Exception e) { HandleException(e, Driver); throw; } }