| Index: pkg/webdriver/lib/webdriver.dart
|
| diff --git a/pkg/webdriver/lib/webdriver.dart b/pkg/webdriver/lib/webdriver.dart
|
| index 83ea292c98932c464752205944df305f09f4d70a..25d4b72b7527fd313ee1f50594f48638aac8a78e 100644
|
| --- a/pkg/webdriver/lib/webdriver.dart
|
| +++ b/pkg/webdriver/lib/webdriver.dart
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| @@ -1168,8 +1168,19 @@ class WebDriverSession extends WebDriverBase {
|
| * of the element. If the element is not visible, it will be scrolled
|
| * into view.
|
| */
|
| - Future moveTo(String id, int x, int y) =>
|
| - _post('moveto', { 'element': id, 'xoffset': x, 'yoffset' : y});
|
| + Future moveTo(String id, int x, int y) {
|
| + Map json = {};
|
| + if (id != null) {
|
| + json['element'] = id;
|
| + }
|
| + if (x != null) {
|
| + json['xoffset'] = x;
|
| + }
|
| + if (y != null) {
|
| + json['yoffset'] = y;
|
| + }
|
| + return _post('moveto', json);
|
| + }
|
|
|
| /**
|
| * Click a mouse button (at the coordinates set by the last [moveTo] command).
|
|
|