I am trying to check if an element on a page exists by CSS using Selenium 2. Anyone have any examples using PHP Selenium Webdriver Facebook wrapper?
I have tried the below code:
if($driver->findElement(WebDriverBy::xpath("image-e4e")) != 0)
{
}
But gives me this error:
Fatal error: Uncaught exception 'NoSuchElementWebDriverError' with message 'Unable to locate element: {"method":"xpath","selector":"image-e4e"}