Exemplo n.º 1
0
        public void ThenOnlyContentIsDisplayedOnResourcePage(string reportText)
        {
            WaitUtility.Sleep(5);
            var resources = GetResourceTypes();

            Assert.IsTrue(resources.Count == 1 && resources.FirstOrDefault().Equals(reportText, StringComparison.InvariantCultureIgnoreCase));
        }
Exemplo n.º 2
0
        public void ClickPlayVideoButton(string playVideoButtonText)
        {
            DeclineCookie();
            var playVideoButton = _webDriver.FindElement(By.CssSelector($"input[value='{playVideoButtonText.ToUpper()}']"));

            WaitUtility.WaitTillElementIsVisible(playVideoButton, _webDriver);
            playVideoButton.Click();
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 public string GetQueryContentLabelText()
 {
     WaitUtility.WaitTillElementIsVisible(QueryContentLabel, _webDriver);
     return QueryContentLabel.Text;
 }
Exemplo n.º 5
0
 public void ThenVideoPlayerForProductDemoIsDisplayed()
 {
     WaitUtility.WaitTillElementIsVisible(_demoPage.VideoContainer, _webDriver);
     Assert.IsTrue(_demoPage.VideoContainer.Displayed, "the video is not displayed");
 }