/**
  * Specifies wrapped WebElement.
  *
  * @param WebElement   $wrapped_element Element to be wrapped.
  * @param IPageFactory $page_factory    Page factory.
  */
 public function __construct(WebElement $wrapped_element, IPageFactory $page_factory)
 {
     parent::__construct($wrapped_element);
     $this->_pageFactory = $page_factory;
     $this->_pageFactory->initElementContainer($this);
     $this->_pageFactory->initElements($this, $page_factory->createDecorator($this));
 }
 public function testAttribute()
 {
     $expected = 'B';
     $this->webElement->shouldReceive('hasAttribute')->with('A')->once()->andReturn($expected);
     $this->webElement->shouldReceive('getAttribute')->with('A')->once()->andReturn($expected);
     $this->assertSame($expected, $this->typifiedElement->hasAttribute('A'));
     $this->assertSame($expected, $this->typifiedElement->getAttribute('A'));
 }