I am a beginner in using selenium web driver and I am currently experiencing an issue while trying to retrieve the class name of an element. The HTML code of the element is as follows:
<input id="filter-colour-0237739001"><div class="detailbox detailbox-pattern unavailable-colour"><span></span><img src="//lp2.hm.com/hmprod?set=source[/fabric/2014/9B57A69A-FD8D-4D79-9E92-8F5448566C51.jpg],type[FABRICSWATCH]&hmver=0&call=url[file:/product/main]" alt="" title="">
Therefore, I need to extract the class name which is "detailbox detailbox-pattern unavailable-colour" using selenium web driver. I have already obtained the element with the following code:
WebElement ele=driver.findElement(By.id("filter-colour-0237739001"));
Now I need assistance in retrieving the class name. Your help would be highly appreciated. Thank you!