PMA_SeleniumBase::isElementPresent PHP Method

isElementPresent() public method

Check if element is present or not
public isElementPresent ( string $func, string $arg ) : boolean
$func string Locate using - byCss, byXPath, etc
$arg string Selector
return boolean Whether or not the element is present
    public function isElementPresent($func, $arg)
    {
        try {
            $element = call_user_func_array(array($this, $func), array($arg));
        } catch (PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) {
            // Element not present
            return false;
        } catch (InvalidArgumentException $e) {
            // Element not present
            return false;
        }
        // Element Present
        return true;
    }