| Index: pkg/webdriver/lib/webdriver.dart
|
| diff --git a/pkg/webdriver/lib/webdriver.dart b/pkg/webdriver/lib/webdriver.dart
|
| index 724332d959d10ee7496c866a891ea2db91301d4f..7cfabe607e27abde81d073a880e1739ee45cb064 100644
|
| --- a/pkg/webdriver/lib/webdriver.dart
|
| +++ b/pkg/webdriver/lib/webdriver.dart
|
| @@ -285,11 +285,12 @@ class WebDriverBase {
|
| var value = null;
|
| // For some reason we get a bunch of NULs on the end
|
| // of the text and the json.parse blows up on these, so
|
| - // strip them with trim().
|
| + // strip them.
|
| // These NULs can be seen in the TCP packet, so it is not
|
| // an issue with character encoding; it seems to be a bug
|
| // in WebDriver stack.
|
| - results = new String.fromCharCodes(body).trim();
|
| + results = new String.fromCharCodes(body)
|
| + .replaceAll(new RegExp('\u{0}*\$'), '');
|
| if (!successCodes.contains(rsp.statusCode)) {
|
| _failRequest(completer,
|
| 'Unexpected response ${rsp.statusCode}; $results');
|
| @@ -882,9 +883,9 @@ class WebDriverSession extends WebDriverBase {
|
| * Potential Errors: NoSuchWindow, XPathLookupError.
|
| */
|
| Future<String>
|
| - findElementFromId(String id, String strategy, String searchValue) {
|
| - _post('element/$id/element', { 'using': strategy, 'value' : searchValue });
|
| - }
|
| + findElementFromId(String id, String strategy, String searchValue) =>
|
| + _post('element/$id/element',
|
| + { 'using': strategy, 'value' : searchValue });
|
|
|
| /**
|
| * Search for multiple elements on the page, starting from the element with
|
| @@ -897,7 +898,7 @@ class WebDriverSession extends WebDriverBase {
|
| Future<List<String>>
|
| findElementsFromId(String id, String strategy, String searchValue) =>
|
| _post('element/$id/elements',
|
| - params: { 'using': strategy, 'value' : searchValue });
|
| + { 'using': strategy, 'value' : searchValue });
|
|
|
| /**
|
| * Click on an element specified by [id].
|
|
|