소스 검색

Added POD for all the methods that are exposed to the end user.

Aditya Ivaturi 15 년 전
부모
커밋
8d6de51c9f
5개의 변경된 파일579개의 추가작업 그리고 24개의 파일을 삭제
  1. 2 2
      lib/Selenium/Remote/Commands.pm
  2. 287 16
      lib/Selenium/Remote/Driver.pm
  3. 1 1
      lib/Selenium/Remote/ErrorHandler.pm
  4. 2 2
      lib/Selenium/Remote/RemoteConnection.pm
  5. 287 3
      lib/Selenium/Remote/WebElement.pm

+ 2 - 2
lib/Selenium/Remote/Commands.pm

@@ -258,11 +258,11 @@ L<http://code.google.com/p/selenium/>.
 =head1 BUGS
 
 The Selenium issue tracking system is available online at
-L<http://code.google.com/p/selenium/issues/list>.
+L<http://github.com/aivaturi/Selenium-Remote-Driver/issues>.
 
 =head1 AUTHOR
 
-Perl Bindings for Remote Driver by Aditya Ivaturi <ivaturi@gmail.com>
+Perl Bindings for Selenium Remote Driver by Aditya Ivaturi <ivaturi@gmail.com>
 
 =head1 LICENSE
 

+ 287 - 16
lib/Selenium/Remote/Driver.pm

@@ -105,7 +105,10 @@ So a rule of thumb while invoking methods on the driver is to check whether the
 return type is a hash or not. If it is a hash then check for the value of
 cmd_status & take necessary actions accordingly. All the method PODs will list
 what the cmd_return will contain as that is what an end user is mostly interested
-in.
+in. Also, for some of the commands, server does not return any thing back. And
+Server Response Hash will contain a generic string stating that server didn't
+return any thing back. But if cmd_status value is 'OK', then you can safely
+assume that command executed successfully on the server.
 
 =head2 WebElement
 
@@ -134,7 +137,7 @@ created when you use the find_* methods.
     Constructor for Driver. It'll instantiate the object if it can communicate
     with the Selenium RC server.
 
- Input Parameter: 1
+ Input: 7 (all optional)
     desired_capabilities - HASH - Following options are accepted:
       Optional:
         'remote_server_addr' - <string> - IP or FQDN of the RC server machine
@@ -162,8 +165,13 @@ created when you use the find_* methods.
  Usage:
     my $driver = new Selenium::Remote::Driver;
     or
-    my $driver = new Selenium::Remote::Driver('browser_name' => '10.37.129.2',
+    my $driver = new Selenium::Remote::Driver('browser_name' => 'firefox',
                                               'platform' => 'MAC')
+    or
+    my $driver = new Selenium::Remote::Driver('remote_server_addr' => '10.10.1.1',
+                                              'port' => '2222',
+                                              auto_close => 0
+                                              )
 
 =cut
 
@@ -262,7 +270,7 @@ sub new_session {
     Retrieve the capabilities of the specified session.
 
  Output:
-    'cmd_return' will contain a hash of all the capabilities.
+    HASH of all the capabilities.
 
  Usage:
     my $capab = $driver->get_capabilities();
@@ -328,7 +336,7 @@ sub quit {
     Retrieve the current window handle.
 
  Output:
-    String - the window handle
+    STRING - the window handle
 
  Usage:
     print $driver->get_current_window_handle();
@@ -347,7 +355,7 @@ sub get_current_window_handle {
     Retrieve the list of window handles used in the session.
 
  Output:
-    Array of string - list of the window handles
+    ARRAY of STRING - list of the window handles
 
  Usage:
     print Dumper($driver->get_current_window_handles());
@@ -366,7 +374,7 @@ sub get_window_handles {
     Retrieve the url of the current page
 
  Output:
-    String - url
+    STRING - url
 
  Usage:
     print $driver->get_current_url();
@@ -385,7 +393,7 @@ sub get_current_url {
     Navigate to a given url. This is same as get() method.
     
  Input:
-    String - url
+    STRING - url
 
  Usage:
     $driver->navigate('http://www.google.com');
@@ -403,7 +411,7 @@ sub navigate {
     Navigate to a given url
     
  Input:
-    String - url
+    STRING - url
 
  Usage:
     $driver->get('http://www.google.com');
@@ -423,7 +431,7 @@ sub get {
     Get the current page title
 
  Output:
-    String - Page title
+    STRING - Page title
 
  Usage:
     print $driver->get_title();
@@ -452,7 +460,7 @@ sub go_back {
     return $self->_execute_command($res);
 }
 
-=head2 go_back
+=head2 go_forward
 
  Description:
     Equivalent to hitting the forward button on the browser.
@@ -484,6 +492,28 @@ sub refresh {
     return $self->_execute_command($res);
 }
 
+=head2 execute_script
+
+ Description:
+    Inject a snippet of JavaScript into the page and return its result.
+    WebElements that should be passed to the script as an argument should be
+    specified in the arguments array as WebElement object. Likewise,
+    any WebElements in the script result will be returned as WebElement object.
+    
+ Input: 2 (1 optional)
+    Required:
+        STRING - Javascript to execute on the page
+    Optional:
+        ARRAY - list of arguments that need to be passed to the script.
+
+ Output:
+    {*} - Varied, depending on the type of result expected back from the script.
+
+ Usage:
+    $driver->switch_to_frame('frame_1');
+
+=cut
+
 sub execute_script {
     my ( $self, $script, @args ) = @_;
     if ($self->javascript) {
@@ -522,7 +552,7 @@ sub execute_script {
     Get a screenshot of the current page as a base64 encoded image.
 
  Output:
-    String - base64 encoded image
+    STRING - base64 encoded image
 
  Usage:
     print $driver->go_screenshot();
@@ -535,6 +565,22 @@ sub screenshot {
     return $self->_execute_command($res);
 }
 
+=head2 switch_to_frame
+
+ Description:
+    Change focus to another frame on the page. If the frame ID is null, the
+    server will switch to the page's default content.
+    
+ Input: 1
+    Required:
+        {STRING | NUMBER | NULL} - ID of the frame which can be one of the three
+                                   mentioned.
+
+ Usage:
+    $driver->switch_to_frame('frame_1');
+
+=cut
+
 sub switch_to_frame {
     my ( $self, $id ) = @_;
     my $json_null = JSON::null;
@@ -545,6 +591,22 @@ sub switch_to_frame {
     return $self->_execute_command( $res, $params );
 }
 
+=head2 switch_to_window
+
+ Description:
+    Change focus to another window. The window to change focus to may be
+    specified by its server assigned window handle, or by the value of its name
+    attribute.
+
+ Input: 1
+    Required:
+        STRING - Window handle or the Window name
+
+ Usage:
+    $driver->switch_to_window('MY Homepage');
+
+=cut
+
 sub switch_to_window {
     my ( $self, $name ) = @_;
     if ( not defined $name ) {
@@ -562,7 +624,7 @@ sub switch_to_window {
     specific and not covered by the Driver.
 
  Output:
-    String - One of these: SLOW, MEDIUM, FAST
+    STRING - One of these: SLOW, MEDIUM, FAST
 
  Usage:
     print $driver->get_speed();
@@ -581,7 +643,7 @@ sub get_speed {
     Set the user input speed.
 
  Input:
-    String - One of these: SLOW, MEDIUM, FAST
+    STRING - One of these: SLOW, MEDIUM, FAST
 
  Usage:
     $driver->set_speed('MEDIUM');
@@ -598,12 +660,51 @@ sub set_speed {
     return $self->_execute_command( $res, $params );
 }
 
+=head2 get_all_cookies
+
+ Description:
+    Retrieve all cookies visible to the current page. Each cookie will be
+    returned as a HASH reference with the following keys & their value types:
+    
+    'name' - STRING
+    'value' - STRING
+    'path' - STRING
+    'domain' - STRING
+    'secure' - BOOLEAN
+
+ Output:
+    ARRAY of HASHES - list of all the cookie hashes
+
+ Usage:
+    print Dumper($driver->get_all_cookies());
+
+=cut
+
 sub get_all_cookies {
     my ($self) = @_;
     my $res = { 'command' => 'getAllCookies' };
     return $self->_execute_command($res);
 }
 
+=head2 add_cookie
+
+ Description:
+    Set a cookie on the domain.
+
+ Input: 5 (1 optional)
+    Required:
+        'name' - STRING
+        'value' - STRING
+        'path' - STRING
+        'domain' - STRING
+    Optional:
+        'secure' - BOOLEAN - default is false.
+
+ Usage:
+    $driver->add_cookie('foo', 'bar', '/', '.google.com', 0)
+
+=cut
+
 sub add_cookie {
     my ( $self, $name, $value, $path, $domain, $secure ) = @_;
 
@@ -633,12 +734,37 @@ sub add_cookie {
     return $self->_execute_command( $res, $params );
 }
 
+=head2 delete_all_cookies
+
+ Description:
+    Delete all cookies visible to the current page.
+
+ Usage:
+    $driver->delete_all_cookies();
+
+=cut
+
 sub delete_all_cookies {
     my ($self) = @_;
     my $res = { 'command' => 'deleteAllCookies' };
     return $self->_execute_command($res);
 }
 
+=head2 delete_cookie_named
+
+ Description:
+    Delete the cookie with the given name. This command will be a no-op if there
+    is no such cookie visible to the current page.
+
+ Input: 1
+    Required:
+        STRING - name of cookie to delete
+
+ Usage:
+    $driver->delete_cookie_named('foo');
+
+=cut
+
 sub delete_cookie_named {
     my ( $self, $cookie_name ) = @_;
     if ( not defined $cookie_name ) {
@@ -648,12 +774,48 @@ sub delete_cookie_named {
     return $self->_execute_command($res);
 }
 
+=head2 get_page_source
+
+ Description:
+    Get the current page source.
+
+ Output:
+    STRING - The page source.
+
+ Usage:
+    print $driver->get_page_source();
+
+=cut
+
 sub get_page_source {
     my ($self) = @_;
     my $res = { 'command' => 'getPageSource' };
     return $self->_execute_command($res);
 }
 
+=head2 find_element
+
+ Description:
+    Search for an element on the page, starting from the document root. The
+    located element will be returned as a WebElement object.
+
+ Input: 2 (1 optional)
+    Required:
+        STRING - The search target.
+    Optional:
+        STRING - Locator scheme to use to search the element, available schemes:
+                 {class, class_name, css, id, link, link_text, partial_link_text,
+                  tag_name, name, xpath}
+                 Defaults to 'xpath'.
+
+ Output:
+    Selenium::Remote::WebElement - WebElement Object
+    
+ Usage:
+    $driver->find_element("//input[\@name='q']");
+
+=cut
+
 sub find_element {
     my ( $self, $query, $method ) = @_;
     if ( not defined $query ) {
@@ -680,6 +842,29 @@ sub find_element {
     return $ret;
 }
 
+=head2 find_elements
+
+ Description:
+    Search for multiple elements on the page, starting from the document root.
+    The located elements will be returned as an array of WebElement object.
+
+ Input: 2 (1 optional)
+    Required:
+        STRING - The search target.
+    Optional:
+        STRING - Locator scheme to use to search the element, available schemes:
+                 {class, class_name, css, id, link, link_text, partial_link_text,
+                  tag_name, name, xpath}
+                 Defaults to 'xpath'.
+
+ Output:
+    ARRAY of Selenium::Remote::WebElement - Array of WebElement Objects
+    
+ Usage:
+    $driver->find_elements("//input");
+
+=cut
+
 sub find_elements {
     my ( $self, $query, $method ) = @_;
     if ( not defined $query ) {
@@ -713,6 +898,32 @@ sub find_elements {
     return $ret;
 }
 
+=head2 find_child_element
+
+ Description:
+    Search for an element on the page, starting from the identified element. The
+    located element will be returned as a WebElement object.
+
+ Input: 3 (1 optional)
+    Required:
+        Selenium::Remote::WebElement - WebElement object from where you want to
+                                       start searching.
+        STRING - The search target.
+    Optional:
+        STRING - Locator scheme to use to search the element, available schemes:
+                 {class, class_name, css, id, link, link_text, partial_link_text,
+                  tag_name, name, xpath}
+                 Defaults to 'xpath'.
+
+ Output:
+    Selenium::Remote::WebElement - WebElement Object
+    
+ Usage:
+    my $elem1 = $driver->find_element("//select[\@name='ned']");
+    my $child = $driver->find_child_element($elem1, "//option[\@value='es_ar']");
+
+=cut
+
 sub find_child_element {
     my ( $self, $elem, $query, $method ) = @_;
     my $ret;
@@ -739,6 +950,33 @@ sub find_child_element {
     return $ret;
 }
 
+=head2 find_child_elements
+
+ Description:
+    Search for multiple element on the page, starting from the identified
+    element. The located elements will be returned as an array of WebElement
+    objects.
+
+ Input: 3 (1 optional)
+    Required:
+        Selenium::Remote::WebElement - WebElement object from where you want to
+                                       start searching.
+        STRING - The search target.
+    Optional:
+        STRING - Locator scheme to use to search the element, available schemes:
+                 {class, class_name, css, id, link, link_text, partial_link_text,
+                  tag_name, name, xpath}
+                 Defaults to 'xpath'.
+
+ Output:
+    ARRAY of Selenium::Remote::WebElement - Array of WebElement Objects.
+    
+ Usage:
+    my $elem1 = $driver->find_element("//select[\@name='ned']");
+    my $child = $driver->find_child_elements($elem1, "//option");
+
+=cut
+
 sub find_child_elements {
     my ( $self, $elem, $query, $method ) = @_;
     my $ret;
@@ -773,12 +1011,27 @@ sub find_child_elements {
     return $ret;
 }
 
+=head2 get_active_element
+
+ Description:
+    Get the element on the page that currently has focus.. The located element
+    will be returned as a WebElement object.
+
+ Output:
+    Selenium::Remote::WebElement - WebElement Object
+    
+ Usage:
+    $driver->get_active_element();
+
+=cut
+
 sub get_active_element {
     my ($self) = @_;
     my $res = { 'command' => 'getActiveElement' };
     return $self->_execute_command($res);
 }
 
+# Not yet supported on the server
 sub describe_element {
     my ( $self, $element ) = @_;
 
@@ -790,6 +1043,24 @@ sub describe_element {
     return "Not yet supported";
 }
 
+=head2 compare_elements
+
+ Description:
+    Test if two element IDs refer to the same DOM element.
+
+ Input: 2
+    Required:
+        Selenium::Remote::WebElement - WebElement Object
+        Selenium::Remote::WebElement - WebElement Object
+
+ Output:
+    BOOLEAN
+    
+ Usage:
+    $driver->compare_elements($elem_obj1, $elem_obj2);
+
+=cut
+
 sub compare_elements {
     my ($self, $elem1, $elem2) = @_;
     my $res = { 'command' => 'elementEquals',
@@ -812,11 +1083,11 @@ L<http://code.google.com/p/selenium/>.
 =head1 BUGS
 
 The Selenium issue tracking system is available online at
-L<http://code.google.com/p/selenium/issues/list>.
+L<http://github.com/aivaturi/Selenium-Remote-Driver/issues>.
 
 =head1 AUTHOR
 
-Perl Bindings for Remote Driver by Aditya Ivaturi <ivaturi@gmail.com>
+Perl Bindings for Selenium Remote Driver by Aditya Ivaturi <ivaturi@gmail.com>
 
 =head1 LICENSE
 

+ 1 - 1
lib/Selenium/Remote/ErrorHandler.pm

@@ -97,7 +97,7 @@ L<http://code.google.com/p/selenium/>.
 =head1 BUGS
 
 The Selenium issue tracking system is available online at
-L<http://code.google.com/p/selenium/issues/list>.
+L<http://github.com/aivaturi/Selenium-Remote-Driver/issues>.
 
 =head1 AUTHOR
 

+ 2 - 2
lib/Selenium/Remote/RemoteConnection.pm

@@ -124,11 +124,11 @@ L<http://code.google.com/p/selenium/>.
 =head1 BUGS
 
 The Selenium issue tracking system is available online at
-L<http://code.google.com/p/selenium/issues/list>.
+L<http://github.com/aivaturi/Selenium-Remote-Driver/issues>.
 
 =head1 AUTHOR
 
-Perl Bindings for Remote Driver by Aditya Ivaturi <ivaturi@gmail.com>
+Perl Bindings for Selenium Remote Driver by Aditya Ivaturi <ivaturi@gmail.com>
 
 =head1 LICENSE
 

+ 287 - 3
lib/Selenium/Remote/WebElement.pm

@@ -8,6 +8,27 @@ use Data::Dumper;
 # constructor when this class is instantiated.
 my $driver;
 
+=head1 NAME
+
+Selenium::Remote::WebElement - Representation of an HTML Element used by Selenium Remote Driver
+
+=cut
+
+=head1 DESCRIPTION
+
+Selenium Webdriver represents all the HTML elements as WebElement. This module
+provides a mechanism to represent them as objects & perform various actions on
+the related elements. This module should not be instantiated directly by the end
+user. Selenium::Remote::Driver instantiates this module when required. Typically,
+the find_element method in Selenium::Remote::Driver returns this object on which
+various element related operations can be carried out. 
+
+=cut
+
+=head1 FUNCTIONS
+
+=cut
+
 sub new {
     my ($class, $id, $parent) = @_;
     $driver = $parent;
@@ -18,81 +39,259 @@ sub new {
     return $self;
 }
 
+=head2 click
+
+ Description:
+    Click the element.
+
+ Usage:
+    $elem->click();
+
+=cut
+
 sub click {
     my ($self) = @_;
     my $res = { 'command' => 'clickElement', 'id' => $self->{id} };
     return $driver->_execute_command($res);
 }
 
+=head2 get_value
+
+ Description:
+    Query for the value of an element, as determined by its value attribute.
+
+ Output:
+    {STRING | NULL} The element's value, or null if it does'nt have a value attribute.
+
+ Usage:
+    $elem->get_value();
+
+=cut
+
 sub get_value {
     my ($self) = @_;
     my $res = { 'command' => 'getElementValue', 'id' => $self->{id} };
     return $driver->_execute_command($res);
 }
 
+=head2 submit
+
+ Description:
+    Submit a FORM element. The submit command may also be applied to any element
+    that is a descendant of a FORM element.
+
+ Usage:
+    $elem->submit();
+
+=cut
+
 sub submit {
     my ($self) = @_;
     my $res = { 'command' => 'submitElement', 'id' => $self->{id} };
     return $driver->_execute_command($res);
 }
 
+=head2 send_keys
+
+ Description:
+    Send a sequence of key strokes to an element.
+
+ Input: 1
+    Required:
+        {ARRAY | STRING} - Array of strings or a string.
+
+ Usage:
+    my @arr_str = ['abcd'];
+    $elem->send_keys(@arr_str);
+
+=cut
+
 sub send_keys {
     my ($self, $string) = @_;
     my $res = { 'command' => 'sendKeysToElement', 'id' => $self->{id} };
+    my @arr_str;
+    if (ref $string ne 'ARRAY') {
+        $arr_str[0] = $string;
+    }
+    else {
+        @arr_str = $string;
+    }
     my $params = {
-        'value' => $string
+        'value' => @arr_str
     };
     return $driver->_execute_command($res, $params);
 }
 
+=head2 is_selected
+
+ Description:
+    Determine if an OPTION element, or an INPUT element of type checkbox or
+    radiobutton is currently selected.
+
+ Output:
+    BOOLEAN - whether the element is selected
+
+ Usage:
+    $elem->is_selected();
+
+=cut
+
 sub is_selected {
     my ($self) = @_;
     my $res = { 'command' => 'isElementSelected', 'id' => $self->{id} };
     return $driver->_execute_command($res);
 }
 
+=head2 set_selected
+
+ Description:
+    Select an OPTION element, or an INPUT element of type checkbox or radiobutton. 
+
+ Usage:
+    $elem->set_selected();
+
+=cut
+
 sub set_selected {
     my ($self) = @_;
     my $res = { 'command' => 'setElementSelected', 'id' => $self->{id} };
     return $driver->_execute_command($res);
 }
 
+=head2 toggle
+
+ Description:
+    Toggle whether an OPTION element, or an INPUT element of type checkbox or
+    radiobutton is currently selected.
+    
+ Output:
+    BOOLEAN - Whether the element is selected after toggling its state.
+
+ Usage:
+    $elem->toggle();
+
+=cut
+
 sub toggle {
     my ($self) = @_;
     my $res = { 'command' => 'toggleElement', 'id' => $self->{id} };
     return $driver->_execute_command($res);
 }
 
+=head2 is_enabled
+
+ Description:
+    Determine if an element is currently enabled.
+    
+ Output:
+    BOOLEAN - Whether the element is enabled.
+
+ Usage:
+    $elem->is_enabled();
+
+=cut
+
 sub is_enabled {
     my ($self) = @_;
     my $res = { 'command' => 'isElementEnabled', 'id' => $self->{id} };
     return $driver->_execute_command($res);
 }
 
+=head2 get_element_location
+
+ Description:
+   Determine an element's location on the page. The point (0, 0) refers to the
+   upper-left corner of the page.
+    
+ Output:
+    HASH - The X and Y coordinates for the element on the page.
+
+ Usage:
+    $elem->get_element_location();
+
+=cut
+
 sub get_element_location {
     my ($self) = @_;
     my $res = { 'command' => 'getElementLocation', 'id' => $self->{id} };
     return $driver->_execute_command($res);
 }
 
+=head2 get_element_location_in_view
+
+ Description:
+    Determine an element's location on the screen once it has been scrolled
+    into view.
+    
+    Note: This is considered an internal command and should only be used to
+    determine an element's location for correctly generating native events.
+    
+ Output:
+    {x:number, y:number} The X and Y coordinates for the element on the page.
+
+ Usage:
+    $elem->get_element_location_in_view();
+
+=cut
+
 sub get_element_location_in_view {
     my ($self) = @_;
     my $res = { 'command' => 'getElementLocationInView', 'id' => $self->{id} };
     return $driver->_execute_command($res);
 }
 
+=head2 get_tag_name
+
+ Description:
+    Query for an element's tag name.
+    
+ Output:
+    STRING - The element's tag name, as a lowercase string.
+
+ Usage:
+    $elem->get_tag_name();
+
+=cut
+
 sub get_tag_name {
     my ($self) = @_;
     my $res = { 'command' => 'getElementTagName', 'id' => $self->{id} };
     return $driver->_execute_command($res);
 }
 
+=head2 clear
+
+ Description:
+    Clear a TEXTAREA or text INPUT element's value.
+    
+ Usage:
+    $elem->clear();
+
+=cut
+
 sub clear {
     my ($self) = @_;
     my $res = { 'command' => 'clearElement', 'id' => $self->{id} };
     return $driver->_execute_command($res);
 }
 
+=head2 get_attribute
+
+ Description:
+    Get the value of an element's attribute.
+
+ Input: 1
+    Required:
+        STRING - name of the attribute of the element
+    
+ Output:
+    {STRING | NULL} The value of the attribute, or null if it is not set on the element.
+
+ Usage:
+    $elem->get_attribute('name');
+
+=cut
+
 sub get_attribute {
     my ($self, $attr_name) = @_;
     if (not defined $attr_name) {
@@ -105,12 +304,41 @@ sub get_attribute {
     return $driver->_execute_command($res);
 }
 
+=head2 is_displayed
+
+ Description:
+    Determine if an element is currently displayed.
+    
+ Output:
+    BOOLEAN - Whether the element is displayed.
+
+ Usage:
+    $elem->is_displayed();
+
+=cut
+
 sub is_displayed {
     my ($self) = @_;
     my $res = { 'command' => 'isElementDisplayed', 'id' => $self->{id} };
     return $driver->_execute_command($res);
 }
 
+=head2 drag
+
+ Description:
+    Drag and drop an element. The distance to drag an element should be
+    specified relative to the upper-left corner of the page and it starts at 0,0
+
+ Input: 2
+    Required:
+        NUMBER - X axis distance in pixels
+        NUMBER - Y axis distance in pixels
+    
+ Usage:
+    $elem->drag(216,158);
+
+=cut
+
 sub drag {
     my ($self, $x, $y) = @_;
     if ((not defined $x) || (not defined $y)){
@@ -124,18 +352,64 @@ sub drag {
     return $driver->_execute_command($res, $params);
 }
 
+=head2 get_size
+
+ Description:
+    Determine an element's size in pixels. The size will be returned with width
+    and height properties.
+
+ Output:
+    HASH - The width and height of the element, in pixels.
+    
+ Usage:
+    $elem->get_size();
+
+=cut
+
 sub get_size {
     my ($self) = @_;
     my $res = { 'command' => 'getElementSize', 'id' => $self->{id} };
     return $driver->_execute_command($res);
 }
 
+=head2 get_text
+
+ Description:
+    Get the innerText of the element.
+
+ Output:
+    STRING - innerText of an element
+    
+ Usage:
+    $elem->get_text();
+
+=cut
+
 sub get_text {
     my ($self) = @_;
     my $res = { 'command' => 'getElementText', 'id' => $self->{id} };
     return $driver->_execute_command($res);
 }
 
+=head2 get_css_attribute
+
+ Description:
+    Query the value of an element's computed CSS property. The CSS property to
+    query should be specified using the CSS property name, not the JavaScript
+    property name (e.g. background-color instead of backgroundColor).
+
+ Input: 1
+    Required:
+        STRING - name of the css-attribute
+
+ Output:
+    STRING - Value of the css attribute
+    
+ Usage:
+    $elem->get_css_attribute('background-color');
+
+=cut
+
 sub get_css_attribute {
     my ($self, $attr_name) = @_;
     if (not defined $attr_name) {
@@ -148,6 +422,16 @@ sub get_css_attribute {
     return $driver->_execute_command($res);
 }
 
+=head2 hover
+
+ Description:
+    Move the mouse over an element.
+
+ Usage:
+    $elem->hover();
+
+=cut
+
 sub hover {
     my ($self) = @_;
     my $res = { 'command' => 'hoverOverElement', 'id' => $self->{id} };
@@ -165,11 +449,11 @@ L<http://code.google.com/p/selenium/>.
 =head1 BUGS
 
 The Selenium issue tracking system is available online at
-L<http://code.google.com/p/selenium/issues/list>.
+L<http://github.com/aivaturi/Selenium-Remote-Driver/issues>.
 
 =head1 AUTHOR
 
-Perl Bindings for Remote Driver by Aditya Ivaturi <ivaturi@gmail.com>
+Perl Bindings for Selenium Remote Driver by Aditya Ivaturi <ivaturi@gmail.com>
 
 =head1 LICENSE