Esempio n. 1
0
        private void VerifyVideoAttribute(HtmlVideo video, string attName, string attValue)
        {
            var attr = video.Attributes.FirstOrDefault(a => a.Name == attName);

            Assert.IsNotNull(attr, "Unable to find attribute: " + attName);
            Assert.AreEqual(attValue.ToLower(), attr.Value.ToLower(), "Attribute " + attName + " value not as expected.");
        }
        /// <summary>
        /// Verifies the video.
        /// </summary>
        /// <param name="src">The SRC.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        public void VerifyVideo(string src, int width = 0, int height = 0)
        {
            HtmlVideo video = ActiveBrowser.Find.ByExpression <HtmlVideo>("src=~" + src)
                              .AssertIsPresent("video");

            if (width != 0 && height != 0)
            {
                Assert.IsTrue(video.Width.Equals(width), "width is not correct");
                Assert.IsTrue(video.Height.Equals(height), "height is not correct");
            }
        }
        public void VerifyVideo(string src, int width = 0, int height = 0)
        {
            HtmlVideo video = EM.MediaGallery.MediaGalleryFrontend.Videos.Where <HtmlVideo>(k => k.Src.StartsWith(src)).FirstOrDefault()
                              .AssertIsPresent("video");

            if (width != 0 && height != 0)
            {
                Assert.IsTrue(video.Width.Equals(width), "width is not correct");
                Assert.IsTrue(video.Height.Equals(height), "height is not correct");
            }
        }
Esempio n. 4
0
 protected void lvVideo_ItemDataBound(object sender, ListViewItemEventArgs e)
 {
     try
     {
         HtmlVideo   video = (HtmlVideo)e.Item.FindControl("video");
         HiddenField Id    = (HiddenField)e.Item.FindControl("hfId");
         video.Src = GetSource(Convert.ToInt64(Id.Value));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 private void VerifyVideoAttribute(HtmlVideo video, string attName, string attValue)
 {
     var attr = video.Attributes.FirstOrDefault(a => a.Name == attName);
     Assert.IsNotNull(attr, "Unable to find attribute: " + attName);
     Assert.AreEqual(attValue.ToLower(), attr.Value.ToLower(), "Attribute " + attName + " value not as expected.");
 }