public function __construct(NodeElement $node, Session $session) { if (!$node->hasClass(self::NOTICE_CLASS)) { throw new \InvalidArgumentException(sprintf('Provided node does not have class %s', self::NOTICE_CLASS)); } parent::__construct($node->getXpath(), $session); }
/** * Initializes web element. * * @param array $selenium_selector Element selector. * @param Session $session Session. */ public function __construct(array $selenium_selector, Session $session) { $this->seleniumSelector = $selenium_selector; parent::__construct($this->seleniumSelectorToXpath($session), $session); }
/** * A bit of a hack, we require the Session to create instances of WPTableRow, so we store it here * @param NodeElement $node * @param Session $session */ public function __construct(NodeElement $node, Session $session) { parent::__construct($node->getXpath(), $session); $this->session = $session; }
/** * @param Session $session * @param Factory $factory */ public function __construct(Session $session, Factory $factory) { parent::__construct($this->getSelectorAsXpath($session->getSelectorsHandler()), $session); $this->factory = $factory; }