I tried to find the link on a page to click:
<a id="folder0" class="js-folder icon-wrap icon-wrap_left menu__item__link menu__item__link_act menu__item__link_unread" href="/messages/inbox" rel="history">
<span class="js-folder-b-unread js-folder-unread menu__item__link__qnt">7</span>
<i class="js-folder-ico icon icon_left icon_folders icon_inbox_act"></i>
<span class="menu__item__link__text menu__item__link__text_linear">Input</span>
</a>
Java code:
driver.findElement(By.xpath(".//*[@id='folder0']/span[2]")).click();
But the driver can't locate the element:
org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"xpath","selector":".//*[@id='folder0']/span[2]"}