I am trying to reach this div and to click it later.
<div class="leaflet-marker-icon marker-cluster marker-cluster-small leaflet-clickable leaflet-zoom-animated" style="margin-left: -6px; margin-top: -6px; width: 12px; height: 12px; opacity: 1; transform: translate(702px, 396px); z-index: 396;" title="13 tracks listened in , UA">
Here's what I'm trying to do:
WebElement cluster = driver.findElement(By.cssSelector("marker-cluster-small"));
Here's what I've tried to do:
WebElement cluster = driver.findElement(By.xpath("//div[@class='leaflet-marker-icon marker-cluster marker-cluster-small leaflet-clickable leaflet-zoom-animated']"));
None of the ways work. The first one throws "Unable to locate element" message. No error appears on second one, but when i do:
cluster.click();
nothing happens. What am I doing wrong? Thanks.