//FOR ELECTRICITY WITH NO BIL public DetailsPage ValidateHaveNoBillElectricityIDontKnow() { Economy7NoCheckBox.Click(); DontKnowCheckBox.Click(); GoToEnergyNextButton.Click(); return(new DetailsPage(Driver)); }
public YourEnergyPage ValidateElectricity(string tariff, string economyMeter, string payment, string heatingSource, string usage, string usageTime) { var selectTariff = Driver.FindElement(By.ClassName("chosen-results")); var selectOption = new SelectElement(selectTariff); selectOption.SelectByText(tariff); if (Economy7YesCheckBox.Text.Contains(economyMeter)) { Economy7YesCheckBox.Click(); } if (Economy7NoCheckBox.Text.Contains(economyMeter)) { Economy7NoCheckBox.Click(); } var paymentOption = Driver.FindElement(By.Id("electricity_payment_method_dropdown_link_chosen")); var selectPayment = new SelectElement(paymentOption); selectPayment.SelectByText(payment); if (MainSourchOfHeatingYesCheckBox.Text.Contains(heatingSource)) { MainSourchOfHeatingYesCheckBox = null; } if (MainSourchOfHeatingNoCheckBox.Text.Contains(heatingSource)) { MainSourchOfHeatingNoCheckBox.Click(); } KWhCheckBox.Click(); // use "Annually" only for now, other logic not implemented yet UsageInputField.SendKeys(usage); var usagePeriod = new SelectElement(ChosenResults); usagePeriod.SelectByText(usageTime); return(this); }