@Then("^I should see \"([^\"]*)\" in the school SRP header$")
  public void I_should_see_the_school_header(String header) throws Throwable {
    Thread.sleep(3000);

    System.out.println("The Expected H1 is :" + header);
    System.out.println("The Actual H1 is   :" + searchPage.getSchoolHeader());

    Assert.assertTrue("Failed: Wrong Header", searchPage.getSchoolHeader().equals(header));
  }
  @Then("^I check the header is \"([^\"]*)\"$")
  public void CheckHeader(String header) throws Throwable {
    Thread.sleep(3000);

    System.out.println("The Expected H1 is :" + header);
    System.out.println("The Actual H1 is   :" + searchPage.getHeader());

    Assert.assertTrue("Failed: Wrong Header", searchPage.getHeader().equals(header));
  }
  @Then("^I check the title contains \"([^\"]*)\"$")
  public void CheckTitle(String title) throws Throwable {
    Thread.sleep(3000);

    System.out.println("The Expected Title to include:" + title);
    System.out.println("The Actual H1 is             :" + searchPage.getPageTitle());

    Assert.assertTrue("Failed: Wrong Title", searchPage.getPageTitle().contains(title));
  }
 @Then("^I click the Request Info Button on FRC SRP$")
 public void ClickCheckAvailability() throws Throwable {
   Thread.sleep(3000);
   searchPage.clickCheckAvailability();
   System.out.println("Clicked the Request Info button on the first listing on the SRP");
   driver.manage().timeouts().pageLoadTimeout(3000, TimeUnit.SECONDS);
 }
  @Given("^I am on a FRC Search Results Page$")
  public void NavigateToFRC_SRP() throws Throwable {
    searchPage = new SearchPage(driver);
    searchPage.NavigateToFRC_SRP();

    System.out.println("Executed FRC SRP navigation");
  }
  @Then("^I should see \"([^\"]*)\" in the SRP confirmation form$")
  public void ConfirmationFormOn_SRP(String Message) throws Throwable {
    try {
      Assert.assertTrue(
          "Message did not match anything in the form",
          searchPage.LocalConnectConfirmation().contains(Message));
      System.out.println(Message + " - passed");

    } catch (AssertionError e) {
      System.out.println(Message + " - failed");
      throw e;
    }
  }
  @Then("^I should see \"([^\"]*)\" in the progrexion confirmation form on SRP$")
  public void ForRentCOnfirmationSRP(String Message) throws Throwable {
    try {
      Assert.assertTrue(
          "Message did not match anything in the form",
          searchPage.ForRentProgressionConfirmation().contains(Message));
      System.out.println(Message + " - passed");

    } catch (AssertionError e) {
      System.out.println(Message + " - failed");
      throw e;
    }
  }
  @Then("^I should see \"([^\"]*)\" in the srp lead confirmation form$")
  public void I_should_see_in_the_srp_lead_confirmation_form(String arg1) throws Throwable {
    // Express the Regexp above with the code you wish you had
    try {
      Assert.assertTrue(
          "Message did not match anything in the form",
          searchPage.leadConfirmationForm().contains(arg1));
      System.out.println(arg1 + " - passed");

    } catch (AssertionError e) {
      System.out.println(arg1 + " - failed");
      throw e;
    }
  }
 @Given("I am on a For Sale Search Results Page$")
 public void NavigateToForSaleSRP() throws Throwable {
   searchPage = new SearchPage(driver);
   searchPage.NavigateToForSaleSRP();
   System.out.println("Executed For Rent UDP navigation");
 }
 @And("^I enter \"([^\"]*)\" in the \"([^\"]*)\" field on the SRP$")
 public void PopulateTargetFieldOnSRP(String value, String target) throws InterruptedException {
   Thread.sleep(3000);
   searchPage.PopulateFieldSRP(value, target);
   System.out.println("Populated " + target + " Field with:" + value);
 }
 @And("^I click the Get FREE Credit Repair Consultation button on SRP$")
 public void ClickGetFreeFreeCreditRepairButtonSRP() throws Throwable {
   searchPage.ClickCreditRepairButton();
   System.out.println("Submitted Form");
   driver.manage().timeouts().pageLoadTimeout(3000, TimeUnit.SECONDS);
 }
 @Then("^I select \"([^\"]*)\" from the \"([^\"]*)\" dropdown on SRP$")
 public void SelectCreditScoreSRP(String arg1, String arg2) {
   searchPage.SelectDropdown(arg1, arg2);
   System.out.println("Selected " + arg1 + " from the " + arg2 + " dropdown");
 }
 @Then("^I select \"([^\"]*)\" from the downPayment dropdown on SRP$")
 public void SelectDownPaymentDropdownSRP(String arg1) throws Throwable {
   searchPage.SelectDownPaymentDropdown(arg1);
   System.out.println("Selected " + arg1);
 }
 @Given("^I should see the Lead Confirmation on SRP$")
 public void AssertConfirmationFormSRP() throws Throwable {
   searchPage.Confirmation();
   Assert.assertTrue("No Confirmation Form", searchPage.Confirmation());
   System.out.println("Is Confirmation Form Displayed: " + searchPage.Confirmation());
 }
 @And("^I click the Get Prequalified button on SRP$")
 public void ClickGetPreqButtonOnSRP() {
   searchPage.ClickPrequalifyButton();
   driver.manage().timeouts().pageLoadTimeout(3000, TimeUnit.SECONDS);
 }
 @Then("^I see the Agent Contact Form$")
 public void IsAgentCardVisible() throws Throwable {
   searchPage.IsAgentCardPresent();
   Assert.assertTrue("No Lead Form", searchPage.IsAgentCardPresent());
   System.out.println("Is Lead Form Displayed: " + searchPage.IsAgentCardPresent());
 }
 @When("^I deselect the Improve Your Credit Score checkbox$")
 public void deselectCreditScorecheckbox() throws Throwable {
   searchPage.ClickImproveCreditButton();
   System.out.println("Deselected the Credit Card Checkbox");
 }
 @When("^I click the send button from the agent card on SPR for FRC$")
 public void clickSendButtonFromAgentCardFRC() throws Throwable {
   searchPage.ClickSendButtonFRC();
   System.out.println("Clicked the send button from the agent card");
 }
 @And("^I uncheck the get prequalified box on SRP$")
 public void UncheckPrequalifiedBoxON_SRP() throws Throwable {
   searchPage.UncheckPrequalifyButton();
   System.out.println("Unchecked Prequalify Button");
 }
 // SRP Assertions
 @Then("^I should see the myHomes Overlay Agent Card as a confirmation form$")
 public void isConfirmationFormPresent() throws Throwable {
   searchPage.IsConfirmationFormPresent();
   Assert.assertTrue("No Confirmation Form", searchPage.IsConfirmationFormPresent());
   System.out.println("Is Confirmation Form Displayed: " + searchPage.IsConfirmationFormPresent());
 }
 @Then("^I should see the confirmatio form on SRP$")
 public void isCOnfirmationFormPresent_SRP() throws Throwable {
   Thread.sleep(3000);
   Assert.assertTrue("No Credit Repair Form", searchPage.isLocalConnectFormPresent());
   System.out.println("Is Confirmation Form Displayed: " + searchPage.isLocalConnectFormPresent());
 }
  @Then("^I can see number of results on the search page$")
  public void SeeNumberOfResults() throws Throwable {

    System.out.println("Number Of Results: " + searchPage.numberOfResults());
  }