You are here

public function CssSelector::translateToXPath in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/src/Selector/CssSelector.php \Behat\Mink\Selector\CssSelector::translateToXPath()

Translates CSS into XPath.

Parameters

string|array $locator current selector locator:

Return value

string

Overrides SelectorInterface::translateToXPath

File

vendor/behat/mink/src/Selector/CssSelector.php, line 29

Class

CssSelector
CSS selector engine. Transforms CSS to XPath.

Namespace

Behat\Mink\Selector

Code

public function translateToXPath($locator) {
  if (!is_string($locator)) {
    throw new \InvalidArgumentException('The CssSelector expects to get a string as locator');
  }
  return CSS::toXPath($locator);
}