Skip to content

Commit

Permalink
deal with empty results, add 'displayed'
Browse files Browse the repository at this point in the history
Summary:

Reviewers:

Test Plan:

Task ID:
  • Loading branch information
Justin Bishop committed Sep 27, 2011
1 parent 986dfe5 commit 2acfc21
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion WebDriverBase.php
Expand Up @@ -82,7 +82,12 @@ protected function curl($http_method,
}
curl_close($curl);

return array('value' => $results['value'], 'info' => $info);
$value = null;
if (is_array($results) && array_key_exists('value', $results)) {
$value = $results['value'];
}

return array('value' => $value, 'info' => $info);
}

public function __call($name, $arguments) {
Expand Down
1 change: 1 addition & 0 deletions WebDriverElement.php
Expand Up @@ -31,6 +31,7 @@ protected function methods() {
'location_in_view' => 'GET',
'size' => 'GET',
'css' => 'GET',
'displayed' => 'GET',
);
}

Expand Down

0 comments on commit 2acfc21

Please sign in to comment.