Check if element given by xpath is visible or not
@param string $xpath
@return bool
@throws DriverException
546297
public function isVisible($xpath) {
    $elements = $this->findElement($xpath, 1);
    return $this->browser->isVisible($elements["page_id"], $elements["ids"][0]);
  }
84617
protected boolean isInvalidateParent(String xpath) {

        if (!CmsXmlUtils.isDeepXpath(xpath)) {
            return false;
        }
        Boolean isInvalidateParent = null;
        // look up the default from the configured mappings
        isInvalidateParent = m_relationChecks.get(xpath);
        if (isInvalidateParent == null) {
            // no value found, try default xpath
            String path = CmsXmlUtils.removeXpath(xpath);
            // look up the default value again without indexes
            isInvalidateParent = m_relationChecks.get(path);
        }
        if (isInvalidateParent == null) {
            return false;
        }
        return isInvalidateParent.booleanValue();
    }
469567
protected function removeInvisibleMenuNodes($dom)
    {
        $xPath = new DomXPath($dom);
        $nodeList = $xPath->query("//*[@visible]");
        foreach ($nodeList as $node) {
            if (!$node->getAttribute('visible')) {
                $node->parentNode->removeChild($node);
            }
        }
    }
826532
private function filterRelativeXPath($xpath)
    {
        $prefixes = $this->findNamespacePrefixes($xpath);

        $crawler = $this->createSubCrawler(null);

        foreach ($this->nodes as $node) {
            $domxpath = $this->createDOMXPath($node->ownerDocument, $prefixes);
            $crawler->add($domxpath->query($xpath, $node));
        }

        return $crawler;
    }
794163
public function xpath($path) {
    if ($path{0} === '/') {
      $this->rewind();
      if ($this->valid()) {
        return $this->current()->xpath($path);
      }
      return $this->_getEmptyElement();
    }

    return $this->_eachGetIterator('xpath', $path);
  }
130209
function hasDirectTextDescendantXpath() {
        var selectorResults = ownerDocument.evaluate(axs.properties.TEXT_CONTENT_XPATH,
                                                     element,
                                                     null,
                                                     XPathResult.ANY_TYPE,
                                                     null);
        for (var resultElement = selectorResults.iterateNext();
             resultElement != null;
             resultElement = selectorResults.iterateNext()) {
            if (resultElement !== element)
                continue;
            return true;
        }
        return false;
    }
200642
public function getNodeAttrAsArray($xPath){
        $usePath = "{$xPath}[@*]";
        $res = $this->content->xpath($usePath);
        if ( $res !== null){
            foreach ($res as $set){
                $dArr = (array) $set->attributes();
                return $dArr['@attributes'];
            }

        }
        return NULL;
    }
1046310
public function seeXmlResponseMatchesXpath($xpath)
    {
        $structure = new XmlStructure($this->connectionModule->_getResponseContent());
        $this->assertTrue($structure->matchesXpath($xpath), 'xpath not matched');
    }
572636
public function isValidDriverClass($className)
    {
        if (!class_exists($className)) {
            return false;
        }

        if (!is_subclass_of($className, 'Bex\\Behat\\ExtensionDriverLocator\\DriverInterface')) {
            return false;
        }

        if (!empty($this->parent) && !is_subclass_of($className, $this->parent)) {
            return false;
        }

        return true;
    }
91439
protected function findElementXpaths($xpath) {
    $elements = $this->browser->find("xpath", $xpath);
    $nodeXPaths = array();

    if (!isset($elements["ids"])) {
      return array();
    }

    foreach ($elements["ids"] as $i => $elementId) {
      $nodeXPaths[] = sprintf('(%s)[%d]', $xpath, $i + 1);
    }
    return $nodeXPaths;
  }
298231
public function getNodeContent($xPath){
        if ($this->content->xpath($xPath) !== null){
            return (string)trim(end($this->content->xpath($xPath)));
        }
        return false;
    }
55783
public function onIsVisibleElement(Model $element, $isVisible): bool
    {
        $isVisible = (bool) $isVisible;

        // load module if it is a module include element
        if ($element instanceof ContentModel && $element->type == 'module') {
            $element = ModuleModel::findByPK($element->module);
        }

        if (!$element instanceof ModuleModel) {
            return $isVisible;
        }

        // do not limit for navigation module. so every module can access it
        $this->navClass = $element->bs_nav_class;

        return $isVisible;
    }
401275
public function iShouldSeeAnUniqueElementWithXpath($xpath)
    {
        $result = $this->getSession()->getPage()->find('xpath', $xpath);

        if (is_null($result)) {
            // There must be exactly one element on the page, anything else is not correct
            throw new ExpectationException(
                sprintf(
                    'The xpath %s (on %s) returned no elements',
                    $xpath,
                    $this->getSession()->getCurrentUrl()
                ),
                $this->getSession()->getDriver()
            );
        }
    }
886765
public function toBeInvisible()
    {
        $this->wait()->until(WebDriverExpectedCondition::invisibilityOfElementLocated($this->elementFinder->getSearchCriteria()));

        return $this;
    }
387457
private function getNodesToExclude(\DOMXPath $xPath)
    {
        $excludedNodes = [];
        foreach (array_keys($this->excludedSelectors) as $selectorToExclude) {
            try {
                $matchingNodes = $xPath->query($this->translateCssToXpath($selectorToExclude));
            } catch (\InvalidArgumentException $e) {
                if ($this->debug) {
                    throw $e;
                }
                continue;
            }
            foreach ($matchingNodes as $node) {
                $excludedNodes[] = $node;
            }
        }

        return $excludedNodes;
    }
1339189
@Override
	public boolean isElementVisible() throws WidgetException {
		try {
			return isVisible() && (getLocationX() > 0) && (getLocationY() > 0);
		} catch (Exception e) {
			throw new WidgetException("Error while determining whether element is visible", locator, e);
		}
	}
619778
public void isElementVisible(By locator, boolean visible) {
		waitForLoaders();
		if (visible) {
			try {
				WebElement found = new WebDriverWait(getWebDriver(), getSeleniumManager().getTimeout())
						.until(ExpectedConditions.visibilityOfElementLocated(locator));
			} catch (WebDriverException e) {
				fail("The element " + locator.toString()
						+ " is not found or invisible where it is expected as present and visible");
			}
		} else {
			try {
				boolean invisible = new WebDriverWait(getWebDriver(), getSeleniumManager().getTimeout())
						.until(ExpectedConditions.invisibilityOfElementLocated(locator));
			} catch (WebDriverException e) {
				fail("The element " + locator.toString() + " is visible where it is expected as invisible");
			}
		}
	}