I have following html element. using selenium i need to find the existence of the span class my-icon . Also findout the first div class is 'active'.Since the class contains multiple classes i was not able to find element by class.
<div class="inner my active">
<div class="left-side">
<span class="icon my-icon"></span></div>
<div class="right-side">
<span class="icon-connected"></span>
<button class="button manage">Manage Connection</button>
</div>
</div>
1)Code used to find the existence of span class <span class="icon my-icon"></span>
it is not working and getting element is not visible.
WebElement ispresnet = driver.findElement(By.xpath("//span[contains(@class, 'my-icon')]"));
boolean os = ispresnet.isDisplayed();