public void ThenOnlyContentIsDisplayedOnResourcePage(string reportText) { WaitUtility.Sleep(5); var resources = GetResourceTypes(); Assert.IsTrue(resources.Count == 1 && resources.FirstOrDefault().Equals(reportText, StringComparison.InvariantCultureIgnoreCase)); }
public void ClickPlayVideoButton(string playVideoButtonText) { DeclineCookie(); var playVideoButton = _webDriver.FindElement(By.CssSelector($"input[value='{playVideoButtonText.ToUpper()}']")); WaitUtility.WaitTillElementIsVisible(playVideoButton, _webDriver); playVideoButton.Click(); }
public void ThenContractManagementDemoPageIsDisplayed(string newPageTitle) { var currentWindowHandle = _webDriver.CurrentWindowHandle; var windowHandles = _webDriver.WindowHandles; var newWindow = windowHandles.FirstOrDefault(d => !d.Equals(currentWindowHandle)); _webDriver.SwitchTo().Window(newWindow); _webDriver.Manage().Window.Maximize(); System.Threading.Thread.Sleep(TimeSpan.FromSeconds(2)); WaitUtility.WaitTillElementIsVisible(_demoPage.PageHeader, _webDriver); Assert.AreEqual(newPageTitle, _demoPage.PageHeader.Text); }
public string GetQueryContentLabelText() { WaitUtility.WaitTillElementIsVisible(QueryContentLabel, _webDriver); return QueryContentLabel.Text; }
public void ThenVideoPlayerForProductDemoIsDisplayed() { WaitUtility.WaitTillElementIsVisible(_demoPage.VideoContainer, _webDriver); Assert.IsTrue(_demoPage.VideoContainer.Displayed, "the video is not displayed"); }