/// <summary> /// Open and Search in Google /// </summary> /// <param name="text"></param> public void GoogleSearch(String text) { Actions.NavigateToUrl(WebEnvironment.AppSettings["GoogleUrl"]); Actions.SendKeys(_fld_Search, text); Actions.PressKey(Keys.Enter); Waits.WaitForPageLoad(); if (Actions.IsAlertPresent()) { Actions.AcceptAlert(); } Actions.Click(_lnkFifthValue); Waits.WaitForPageLoad(); Actions.NavigateToUrl(WebEnvironment.AppSettings["GoogleUrl"]); Actions.SendKeys(_fld_Search, text); Actions.PressKey(Keys.Enter); Waits.WaitForPageLoad(); if (Actions.IsAlertPresent()) { Actions.AcceptAlert(); } for (int it = 0; it <= 19; it++) { Actions.ScrollToBottom(); Actions.Click(_lnkNext); Waits.WaitForPageLoad(); } Actions.ScrollToBottom(); Actions.Click(_lnk25thResult); Waits.WaitForPageLoad(); }
public void ClickOnDelete() { Actions.Click(_elementDelete); Console.WriteLine("Clicked on Delete"); Actions.AcceptAlert(); Console.WriteLine("Confirmed warning pop-up"); Waits.WaitForPageLoad(); }
//this method is used to select the radio and accept the pop up window public void SelectRadioButtonAndAcceptPopUp() { if (Actions.IsDisplayed(_elementRadioBtn)) { Console.WriteLine("Donor is being matched"); Actions.Click(_elementRadioBtn); Actions.AcceptAlert(); } }
public void ClickOnUpdate() { Actions.Click(_elementUpdate); Console.WriteLine("Clicked on Update"); if (Actions.IsAlertPresent()) { Actions.AcceptAlert(); Console.WriteLine("Confirmed warning pop-up"); Waits.WaitForPageLoad(); } }
//Accept the pop up window public void PressEnterKey() { Actions.AcceptAlert(); }