Solomon Raja Solomon Raja - 1 year ago 82
HTML Question

How to click marquee in Selenium?

I have an application where my list of upcoming vessels are running in marquee. How to click the required data using Selenium with Java. Please help if there is any alternative solution.

Answer Source

You could use:

getDriver().findElement(By.tagName("marquee")).click(); // click element
getDriver().findElement(By.tagName("marquee")).getText(); //read value

But the marquee tag is deprecated years ago, and in any of the next browsers versions wont work, so i would change it for another feature.