Moves the mouse to a given position.

@param int     $x       X offset
@param int     $y       Y offset
@param Element $element Relative to an element

@return Browser
514522
public function moveTo($x, $y, Element $element = null)
    {
        $this->request('POST', 'moveto', json_encode(array(
            'element' => $element ? $element->getId() : null,
            'xoffset' => $x,
            'yoffset' => $y
        )));

        return $this;
    }
131601
function getPosition(el) {
      var xPos = 0;
      var yPos = 0;

      while (el) {
        xPos += el.offsetLeft + el.clientLeft;
        yPos += el.offsetTop + el.clientTop;

        el = el.offsetParent;
      }
      return {
        x: xPos,
        y: yPos
      };
    }
730770
function( element ) {
            var result = new $.Point(),
                isFixed,
                offsetParent;

            element      = $.getElement( element );
            isFixed      = $.getElementStyle( element ).position == "fixed";
            offsetParent = getOffsetParent( element, isFixed );

            while ( offsetParent ) {

                result.x += element.offsetLeft;
                result.y += element.offsetTop;

                if ( isFixed ) {
                    result = result.plus( $.getPageScroll() );
                }

                element = offsetParent;
                isFixed = $.getElementStyle( element ).position == "fixed";
                offsetParent = getOffsetParent( element, isFixed );
            }

            return result;
        }
181328
public function flickLeft($x, $y, $distance, $duration)
    {
        return $this
            ->flick($x, $y, WebDriver_Server_Selendroid::DIRECTION_LEFT, $distance, $duration);
    }
56127
public function moveTo($x = 0, $y = 0)
    {
        $this->browser->moveTo($x, $y, $this);

        return $this;
    }
883253
function () {

            var pos = Dom.getXY(this.element);

            this.cfg.setProperty("x", pos[0], true);
            this.cfg.setProperty("y", pos[1], true);
            this.cfg.setProperty("xy", pos, true);

        }
306532
@Override
	public void mouseMoveOut() throws WidgetException {
		try {
	        // TODO: Need to figure out whether 10 is sufficient
	        int offsetAmount = 10;

	        WebElement elem = getWebElement();
	        Dimension dim = elem.getSize();
	        int width = dim.getWidth();
	        Actions builder = new Actions(getGUIDriver().getWrappedDriver());
	        synchronized (InteractiveElement.class) {
	            getGUIDriver().focus();
	            builder.moveToElement(getWebElement(), width + offsetAmount, 0).build().perform();
	        }
		} catch (Exception e) {
			throw new WidgetException("Error while performing mouse move out",
					getByLocator(), e);
		}
	}
1344318
public function Compare( $x, $y )
	{
		$nav1 = $x instanceof XPathNavigator
			? $x
			: null;
		$nav2 = $y instanceof XPathNavigator
			? $y
			: null;
		/**
		 * @var XPathNavigator $nav1
		 * @var XPathNavigator $nav2
		 */
		if ( ! is_null( $nav1 ) && ! is_null( $nav2 ) )
		{
			switch ( $nav1->ComparePosition( $nav2, $this->useLineNo ) )
			{
				case XmlNodeOrder::Before:
					return -1;

				case XmlNodeOrder::After:
					return 1;

				case XmlNodeOrder::Same:
					return 0;

				default:

					// It appears to be correct to return -1 every time because $nav1
					// will always appear before $nav2 because that's the order in which
					// they are presented in the XPath query.
					return -1;

					/**
					 * Below is an implementation of the C# version which appears to be wrong
					 * because the value of spl_object_hash (or getHashCode in C# is random
					 * so the result here is likely to be random.
					 * @var XPathNavigator $root1
					 * @var XPathNavigator $root2
					 */
					$root1 = $nav1->CloneInstance();
					$root1->MoveToRoot();
					$root2 = $nav2->CloneInstance();
					$root2->MoveToRoot();

					$hashCode1 = spl_object_hash( $root1 );
					$hashCode2 = spl_object_hash( $root2 );

					if ( $hashCode1 < $hashCode2 )
					{
						return -1;
					}
					else if ( $hashCode1 > $hashCode2 )
					{
						return 1;
					}
					else
					{
						throw new InvalidOperationException();
					}
			}
		}
		else
			throw XPath2Exception::withErrorCodeAndParams( "XPTY0004", Resources::XPTY0004,
				array(
					"xs:anyAtomicType",
					"node()* in function op:union,op:intersect and op:except"
				)
			);
	}
804371
function(x, y) {
        // make the proxy look like the source element
        var dragEl = this.getDragEl();
        var clickEl = this.getEl();
        Dom.setStyle(clickEl, "visibility", "hidden");
        this._originalIndex = inputEx.indexOf(clickEl ,clickEl.parentNode.childNodes);
        dragEl.className = clickEl.className;
        dragEl.innerHTML = clickEl.innerHTML;
    }
549239
def scroll_from_element(self, on_element, xoffset, yoffset):
        
        self._actions.append(lambda: self._driver.execute(
            Command.TOUCH_SCROLL, {
                'element': on_element.id,
                'xoffset': int(xoffset),
                'yoffset': int(yoffset)}))
        return self
1129308
def click(self, x, y):
        ''''''
        return self.server.jsonrpc.click(x, y)
859234
function(element){
            if(this._boundElement){
                this.stopListening();
            }

            element.addEventListener('mousemove', this);
            element.addEventListener('mouseenter', this);
            element.addEventListener('mouseleave', this);
            element.addEventListener('click', this);

            this._boundElement = element;
        }
537995
def mouseMove(self, x, y):
        
        log.debug('mouseMove %d,%d', x, y)
        self.x, self.y = x, y
        self.pointerEvent(x, y, self.buttons)
        return self
1022559
public function move_to($id = NULL, $x = NULL, $y = NULL)
	{
		throw new Exception_Notimplemented(__FUNCTION__, $this);
	}
1004523
public function doubleClick(WebDriverElement $element = null)
    {
        $this->action->addAction(
            new WebDriverDoubleClickAction($this->mouse, $element)
        );

        return $this;
    }
35402
public boolean mouseDown(Event e, int x, int y) {

        if (iRowHeight == 0 || x > iWidth || y > iHeight) {
            return true;
        }

        y += iRowHeight / 2;

        String[] root = new String[100];

        root[0] = "";

        int     currentindent = 0;
        int     cy            = iRowHeight;
        boolean closed        = false;
        int     i             = 0;

        y += iY;

        for (; i < iRowCount; i++) {
            String[] s      = (String[]) vData.elementAt(i);
            String   key    = s[0];
            String   folder = s[2];
            int      ci     = currentindent;

            for (; ci > 0; ci--) {
                if (key.startsWith(root[ci])) {
                    break;
                }
            }

            if (root[ci].length() < key.length()) {
                ci++;
            }

            if (closed && ci > currentindent) {
                continue;
            }

            if (cy <= y && cy + iRowHeight > y) {
                break;
            }

            root[ci]      = key;
            closed        = folder != null && folder.equals("+");
            currentindent = ci;
            cy            += iRowHeight;
        }

        if (i >= 0 && i < iRowCount) {
            String[] s      = (String[]) vData.elementAt(i);
            String   folder = s[2];

            if (folder != null && folder.equals("+")) {
                folder = "-";
            } else if (folder != null && folder.equals("-")) {
                folder = "+";
            }

            s[2] = folder;

            vData.setElementAt(s, i);
            repaint();
        }

        return true;
    }
846021
function (element) {
    var event = document.createEvent('MouseEvents');
    event.initMouseEvent('mousedown', true, true, window);
    element.dispatchEvent(event);
  }