/** * Initializes proxy for AbstractTypifiedElement. * * @param IElementLocator $locator Element selector. * @param IPageFactory $page_factory Page factory. * @param string $name Name of the element. */ public function __construct(IElementLocator $locator, IPageFactory $page_factory, $name) { $this->_name = $name; $this->className = '\\QATools\\QATools\\HtmlElements\\Element\\TextBlock'; $this->elementClass = '\\QATools\\QATools\\HtmlElements\\Element\\ITypifiedElement'; parent::__construct($locator, $page_factory); }
/** * Initializes BEM proxy. * * @param string $name Name. * @param BEMElementLocator $locator Locator. * @param IPageFactory $page_factory Page factory. */ public function __construct($name, BEMElementLocator $locator, IPageFactory $page_factory = null) { if (!$this->elementClass) { $this->elementClass = '\\QATools\\QATools\\BEM\\Element\\IPart'; } parent::__construct($locator, $page_factory); $this->_name = $name; }
/** * Initializes proxy for WebElement. * * @param IElementLocator $locator Element selector. * @param IPageFactory $page_factory Page factory. */ public function __construct(IElementLocator $locator, IPageFactory $page_factory) { if (!$this->className) { $this->className = '\\QATools\\QATools\\PageObject\\Element\\WebElement'; } if (!$this->elementClass) { $this->elementClass = '\\QATools\\QATools\\PageObject\\Element\\IWebElement'; } parent::__construct($locator, $page_factory); }
/** * @expectedException \QATools\QATools\PageObject\Exception\ElementException * @expectedExceptionCode \QATools\QATools\PageObject\Exception\ElementException::TYPE_UNKNOWN_METHOD * @expectedExceptionMessage "nonExistingMethod" method is not available on the */ public function testMethodForwardingFailure() { $this->element->nonExistingMethod(); }
/** * @expectedException \RuntimeException * @expectedExceptionMessage The exception. */ public function testDynamicExceptionalMethodForwarding() { $this->element->dynamicExceptionalMethod(); }