Example #1
0
 /**
  * {@inheritdoc}
  */
 public function findAll($selector, $locator)
 {
     if ('named' === $selector) {
         $items = $this->findAll('named_exact', $locator);
         if (empty($items)) {
             $items = $this->findAll('named_partial', $locator);
         }
         return $items;
     }
     $xpath = $this->getSelectorsHandler()->selectorToXpath($selector, $locator);
     $xpath = $this->xpathManipulator->prepend($xpath, $this->getXpath());
     return $this->getDriver()->find($xpath);
 }
Example #2
0
 /**
  * @dataProvider getPrependedXpath
  */
 public function testPrepend($prefix, $xpath, $expectedXpath)
 {
     $manipulator = new Manipulator();
     $this->assertEquals($expectedXpath, $manipulator->prepend($xpath, $prefix));
 }