src/Services/WaitForElement.php
protected function waitForElementsWithClass($class, $timeout = 2000)
    {
        try {
            $this->waitForElement('ClassName', $class, $timeout);
        } catch (\Exception $e) {
            throw new CannotFindElement("Can't find an element with the class name of "
                .$class.' within the time period of '.$timeout.' miliseconds');
        }

        return $this;
    }
protected function waitForElementsWithClass($class, $timeout = 2000)
    {
        try {
            $this->waitForElement('ClassName', $class, $timeout);
        } catch (\Exception $e) {
            throw new CannotFindElement("Can't find an element with the class name of "
                .$class.' within the time period of '.$timeout.' miliseconds');
        }

        return $this;
    }
protected function waitForElementsWithClass ( $ class , $ timeout = 2000 ) { try { $ this -> waitForElement ( 'ClassName' , $ class , $ timeout ) ; } catch ( \ Exception $ e ) { throw new CannotFindElement ( "Can't find an element with the class name of " . $ class . ' within the time period of ' . $ timeout . ' miliseconds' ) ; } return $ this ; }
Helper method to wait for an element with the specified class.

@param $class
@param int $timeout

@throws CannotFindElement

@return $this
Helper method to wait for an element with the specified class .