Esempio n. 1
0
 /**
  * Applies a specific action to an element
  *
  * @param NodeElement $element Element to act on
  * @param string $action Action, which may be one of 'hover', 'double click', 'right click', or 'left click'
  * The default 'click' behaves the same as left click
  */
 protected function interactWithElement($element, $action = 'click')
 {
     switch ($action) {
         case 'hover':
             $element->mouseOver();
             break;
         case 'double click':
             $element->doubleClick();
             break;
         case 'right click':
             $element->rightClick();
             break;
         case 'left click':
         case 'click':
         default:
             $element->click();
             break;
     }
 }
Esempio n. 2
0
 public function testDoubleClick()
 {
     $node = new NodeElement('elem', $this->session);
     $this->driver->expects($this->once())->method('doubleClick')->with('elem');
     $node->doubleClick();
 }