html5test Html5 Video Test

编辑:
发布时间: 2020-12-13 02:50:54
分享:
package html5;import java.io.IOException;import java.util.concurrent.TimeUnit;import org.openqa.selenium.By;import org.openqa.selenium.JavascriptExecutor;import org.openqa.selenium.WebDriver;import org.openqa.selenium.WebElement;import org.testng.Assert;import org.testng.annotations.AfterClass;import org.testng.annotations.BeforeClass;import org.testng.annotations.Test;import chrome.ChromeDriverServiceInit;public class VideoTest { WebDriver driver; @BeforeClass public void setUp throws IOException { driver = ChromeDriverServiceInit.chromeConfigure; driver.get; driver.navigate.refresh; } /** * Among Firefox version 37.0.2,Used Basic html to find element was OK , but * using Html5/CSS3/AngularJS not found element that or is undefined ! * Warning: To view this video please enable JavaScript, and consider * upgrading to a web browser that * * Performance ratio : IEDriverServer < FirfoxDriver < ChromeDriverServer * * @throws InterruptedException */ @Test public void testHtml5Video throws InterruptedException { driver.manage.timeouts.implicitlyWait; // Usky awful net WebElement video = driver .findElement); JavascriptExecutor jse = driver; String source = jse.executeScript; Assert.assertEquals; jse.executeScript", video); Thread.sleep; jse.executeScript", video); } @AfterClass public void tearDown { driver.quit; }}
相关阅读
热门精选
孩子 皮肤