使用 selenium webdriver 单击 Flash 对象上的播放按钮
Click play button on Flash Object with selenium webdriver
我必须点击 Flash 对象 swf 的播放按钮,像这样
这是它的 html:
<object id="flashObject" width="100%" height="26px" type="application/x-shockwave-flash" name="flashObject" data="audioplayer.swf">
我被困在这里,不知道如何点击播放按钮。我尝试使用 click with id,但显然没有用。任何的想法?谢谢
您可以在元素中使用播放按钮的位置 (x, y)。确定位置,然后使用这些代码行:
Actions builder = new Actions(driver);
builder.moveToElement(driver.findElement(By.id("flashObject")), poxXPlay, posYPlay).click().build().perform();
这应该可以完成工作。
我必须点击 Flash 对象 swf 的播放按钮,像这样
这是它的 html:
<object id="flashObject" width="100%" height="26px" type="application/x-shockwave-flash" name="flashObject" data="audioplayer.swf">
我被困在这里,不知道如何点击播放按钮。我尝试使用 click with id,但显然没有用。任何的想法?谢谢
您可以在元素中使用播放按钮的位置 (x, y)。确定位置,然后使用这些代码行:
Actions builder = new Actions(driver);
builder.moveToElement(driver.findElement(By.id("flashObject")), poxXPlay, posYPlay).click().build().perform();
这应该可以完成工作。