0 votes
1 view
in Devops and Agile by (25k 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 (63.3k 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();

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...