2
public WebDriver wd;
@Test
public void testSearchPage() throws InterruptedException {
wd.get("http://live.viddigo.com/#/video/100496?_k=224w4e");
wd.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);
WebElement video= wd.findElement(By.id("videoPlayer"));
JavascriptExecutor js =(JavascriptExecutor) wd ;
js.executeScript ("wd.findElement(By.id(\"videoPlayer\")).play();");
}
On运行此代码时,显示wd未找到,尝试过文档,但没有奏效。需要播放使用appium的safari mobile上的自动化视频
你真的实例化了WebDriver对象吗?在'public WebDriver wd'之后还有什么? – Josh
Nop没有任何东西,如果需要在IOS模拟器 - > Safari浏览器中运行它,如果我用Safari浏览器驱动程序启动它,它会失败 –