Unable to find webelement using id or name or classname or xpath
I have the following as my HTML tags.
<div><a href=”https://xxxxxx.com/index.jsp” target=”_blank”>
<div class=”app img-circle” style=”background-color:#00A3AD;” id=”PHUB-0101″><div class=”tile-img”>
<div title=”SOS PPT (SSO)” class=”applabel”>
<span>SOS PPT (SSO)</span></div></div></a></div>
If i inspect the element, i get following as my xpath
I have tried to find this web element by using multiple forms however it doesnt seem to be working. Could you please help?
driver.findElement(By.className(“applabel”)).click(); –> this works but it is taking me to a different webelement which has the same classname
driver.findElement(By.id(“PHUB-0101”)).click(); –> does not work
just would like to clarify that above code snippet is part of a container xpath for which is //*[@id=”appcontainer”]
I guess my question is how do i find an element within a container? Or is there a way to list out the container items and then select it?