Browse Source

added the status command, removed the get/setSpeed from Commands.pm

Gordon Child 14 years ago
parent
commit
0a068a515d
2 changed files with 25 additions and 8 deletions
  1. 4 8
      lib/Selenium/Remote/Commands.pm
  2. 21 0
      lib/Selenium/Remote/Driver.pm

+ 4 - 8
lib/Selenium/Remote/Commands.pm

@@ -8,6 +8,10 @@ sub new {
     
     # http://code.google.com/p/selenium/wiki/JsonWireProtocol
     my $self = {
+        'status'     => {
+                          'method' => 'GET',
+                          'url'    => 'status'
+        },
         'newSession' => {
                           'method' => 'POST',
                           'url'    => 'session'
@@ -68,14 +72,6 @@ sub new {
              'method' => 'POST',
              'url' => "session/:sessionId/window"
         },
-        'getSpeed' => {
-                        'method' => 'GET',
-                        'url' => "session/:sessionId/speed"
-        },
-        'setSpeed' => {
-                        'method' => 'POST',
-                        'url' => "session/:sessionId/speed"
-        },
         'getAllCookies' => {
                         'method' => 'GET',
                         'url' => "session/:sessionId/cookie"

+ 21 - 0
lib/Selenium/Remote/Driver.pm

@@ -289,6 +289,27 @@ sub new_session {
     }
 }
 
+=head2 status
+
+  Description:
+    Query the server's current status. All server implementations
+    should return two basic objects describing the server's current
+    platform and when the server was built.
+
+  Output:
+    Hash ref
+
+  Usage:
+    print Dumper $driver->status;
+
+=cut
+
+sub status {
+    my ($self) = @_;
+    my $res = { 'command' => 'status' };
+    return $self->_execute_command($res);
+}
+
 =head2 mouse_move_to_location
 
  Description: