Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.7k points)

I have to click on play button of Flash object swf, like this

enter image description here

This is its html:

<object id="flashObject" width="100%" height="26px" type="application/x-shockwave-flash" name="flashObject" data="audioplayer.swf">

I am stuck here, don't know how to click on the play button. I tried using click with id, but it didn't work, apparently. Any idea? Thanks

1 Answer

0 votes
by (62.9k points)

You can use the position (x, y) of the play button in your element. Identify the position and then use these lines of code :

 

Actions builder = new Actions(driver);   

builder.moveToElement(driver.findElement(By.id("flashObject")), poxXPlay, posYPlay).click().build().perform();

Browse Categories

...