public TT Navigate <TT>(Action action, bool chooseOkOnConfirmation) where TT : PageBase, new() { var target = new TT(); InitPage(target); if (chooseOkOnConfirmation) { _selenium.ChooseOkOnNextConfirmation(); } action(); if (chooseOkOnConfirmation) { if (_selenium.IsConfirmationPresent()) { _selenium.GetConfirmation(); } } WaitLoad(target); AssertErrorPage(target); AssertCorrectPageLoaded(target); return(target); }
/// <summary> /// Click on a button/ radio-button/ check-box present in the page /// </summary> /// <param name="locator">The locator.</param> /// <param name="type">Type of locator</param> public void Click(string locator, FindType type = FindType.ById) { _selenium.ChooseOkOnNextConfirmation(); _selenium.Click(locator); if (_selenium.IsConfirmationPresent()) { _selenium.GetConfirmation(); } }