Ejemplo n.º 1
0
 public void IndividualSwitchesOnCameraAndMicrophone()
 {
     BrowserContext.Retry(() =>
     {
         BrowserContext.NgDriver.Url.Should().Contain(PageUri.UseCameraMicrophonePage);
     });
     UseMyCameraAndMicrophoneAccordion().Should().Be(UseMyCameraAndMicrophoneSummaryText);
     SetMethods.ClickElement(SwitchOnMedia, BrowserContext);
 }
Ejemplo n.º 2
0
 private void ValidatePage(string url)
 {
     if (!string.IsNullOrEmpty(url))
     {
         _browserContext.Retry(() =>
         {
             _browserContext.NgDriver.Url.Should().Contain(url);
         });
     }
 }
Ejemplo n.º 3
0
 private void WaitUntilPageIsLoaded()
 {
     // All pages have a router outlet so when we can find  this element, then the route is loaded
     try
     {
         _browserContext.Retry(() => { _browserContext.NgDriver.FindElement(By.TagName("router-outlet")); });
     }
     catch (Exception e)
     {
         var url = _browserContext.NgDriver.Url;
         throw new  TimeoutException($"Timed out waiting for page to load, the expected <router-outlet> element did not appear on current url '{url}'", e);
     }
 }
Ejemplo n.º 4
0
        public void VideoHasStarted()
        {
            BrowserContext.Retry(() =>
            {
                double currentTime;
                if (!double.TryParse(GetMethods.GetAttributeValue(_videoContent, BrowserContext, "currentTime"),
                                     out currentTime))
                {
                    throw new Exception();
                }

                if (currentTime > 0)
                {
                    return;
                }
                throw new Exception($"Video current time is {currentTime}, it hasn't started automatically");
            });
        }
Ejemplo n.º 5
0
 public void SignInTitle()
 {
     _context.Retry(() => _context.NgDriver.Title.Trim().Should().Be("Video hearings"));
 }
Ejemplo n.º 6
0
 public void SelectNotSure()
 {
     BrowserContext.Retry(() => SetMethods.SelectRadioButton(By.XPath("//*[@for='choice-notSure']"), BrowserContext), 1);
 }