{@inheritdoc}

@throws ElementNotFoundException
175745
public function getValidationMessageFor($element)
    {
        $errorLabel = $this->getElement($element)->getParent()->find('css', '.sylius-validation-error');

        if (null === $errorLabel) {
            throw new ElementNotFoundException(
                $this->getSession(),
                'Validation message', 'css', '.sylius-validation-error')
            ;
        }

        return $errorLabel->getText();
    }
41225
private function findElement($fqsen)
    {
        return isset($this->elementCollection[$fqsen]) ? $this->elementCollection[$fqsen] : null;
    }
1143596
protected function assertElement($element)
	{
		if ( !is_a($element, $this->elementClass) ) {
			$message = 'Collection element must be of "%s" class, but element of "%s" class given';

			throw new ElementCollectionException(
				sprintf($message, $this->elementClass, get_class($element)),
				ElementCollectionException::TYPE_ELEMENT_CLASS_MISMATCH
			);
		}

		return $this->acceptElement($element);
	}
119246
static function assertElementNotFound( $search, $element, $pageSection = null, $type = 'element' )
    {
        $section = ( $pageSection === null ) ? "" : " in '$pageSection' page section";
        Assertion::assertEmpty( $element, "Found '$search' $type" . $section );
    }
728293
public function assertNotMatchesSelector($selector, DOMElement $element, $message = '')
    {
        return PHPUnit_Framework_Assert::assertThat($element, PHPUnit_Framework_Assert::logicalNot($this->matchesSelector($selector)), $message);
    }
469548
protected function find(string $name)
    {
        foreach ($this->elements as $element) {
            if ($element instanceof NamedInterface && $element->getName() == $name) {
                return $element;
            }
        }

        throw new ReactorException("Unable to find element '{$name}'");
    }
1053346
function initHandlerCustom( $element, &$params )
    {
        if ( $this->XMLSchema->isInline( $element ) )
            return null;

        $this->elementStylesToAttribute( $element );
        return null;
    }
800408
public function attachFileToField($locator, $path)
    {
        $field = $this->findField($locator);

        if (null === $field) {
            throw new ElementNotFoundException($this->getDriver(), 'form field', 'id|name|label|value', $locator);
        }

        $field->attachFile($path);
    }
120366
public function resolveElement(Element $element)
    {
        $elementtype = $this->elementService->findElementtype($element);

        return $this->resolveElementtype($elementtype);
    }
7312
public function get_element($elementname) {
        if ($this->_form->elementExists($elementname)) {
            return $this->_form->getElement($elementname);
        } else {
            return false;
        }
    }
374856
protected function elementNotFound($type, $selector = null, $locator = null)
    {
        @trigger_error(sprintf('The method %s is deprecated as of 1.7 and will be removed in 2.0', __METHOD__), E_USER_DEPRECATED);

        return new ElementNotFoundException($this->driver, $type, $selector, $locator);
    }
1089876
public function expectImplicit($expectedTag = null): ImplicitTagging
    {
        $el = $this;
        if (!$el instanceof ImplicitTagging) {
            throw new \UnexpectedValueException(
                "Element doesn't implement implicit tagging.");
        }
        if (isset($expectedTag)) {
            $el->expectTagged($expectedTag);
        }
        return $el;
    }
600047
public static function createElement(UtilityContext $context, string $elementName, ?string ...$parameters)
    {
        /* Note: no return type to enable type-hinting */

        if (self::$factory === null) {
            self::$factory = self::getFactory(self::$installType);
        }

        return self::$factory::createElement($context, $elementName, ...$parameters);
    }
13686
public function GetElement($name)
    {
        $element = $this->Elements()->GetElement($name);
        if (!$element)
        {
            throw new \Exception(Trans('Core.Form.Error.ElementNotFound.Name_{0}', $name));
        }
        return $element;
    }
337020
public void viewShouldNotShowElement(String viewName, String elementName) throws IllegalAccessException,
			InterruptedException {
		boolean pass = false;

		long startOfLookup = System.currentTimeMillis();

		int timeoutInMillies = getSeleniumManager().getTimeout() * 1000;

		while (!pass) {

			WebElement found = getElementFromReferencedView(viewName, elementName);
			try {
				pass = !found.isDisplayed();
			} catch (NoSuchElementException e) {
				pass = true;
			}

			if (!pass) {
				Thread.sleep(100);
			}
			if (System.currentTimeMillis() - startOfLookup > timeoutInMillies) {
				String foundLocator = getElementLocatorFromReferencedView(viewName, elementName);
				fail("The element \"" + foundLocator + "\" referenced by \"" + elementName + "\" on view/page \"" + viewName + "\" is still found where it is not expected after " + getSeleniumManager().getTimeout() + " seconds.");
				break;
			}
		}
	}
559656
public function iClickTheTitleOnTheBlogPostList($title)
    {
        $node = $this->getSession()->getPage()->find('xpath', sprintf('//h2[contains(., "%s")]/a', $title));

        if (is_null($node)) {
            throw new ElementNotFoundException($this->getSession(), 'Blog post title');
        }

        $node->click();
    }
1182417
public function elementTextNotContains($selectorType, $selector, $text)
    {
        $element = $this->elementExists($selectorType, $selector);
        $actual = $element->getText();
        $regex = '/'.preg_quote($text, '/').'/ui';

        $message = sprintf(
            'The text "%s" appears in the text of the %s, but it should not.',
            $text,
            $this->getMatchingElementRepresentation($selectorType, $selector)
        );

        $this->assertElementText(!preg_match($regex, $actual), $message, $element);
    }