Преглед изворни кода

put get_value back via the non-deprecated subroutine

  - in anticipation of get_value being removed from webdriver
    this is calling get_value via get_attribute('value')
    functionality should be the same
Gordon Child пре 14 година
родитељ
комит
1087b6cab1
1 измењених фајлова са 18 додато и 0 уклоњено
  1. 18 0
      lib/Selenium/Remote/WebElement.pm

+ 18 - 0
lib/Selenium/Remote/WebElement.pm

@@ -283,6 +283,24 @@ sub get_attribute {
     return $self->_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 doesn't have a value attribute.
+
+ Usage:
+    $elem->get_value();
+
+=cut
+
+sub get_value {
+    my ($self) = @_;
+    return $self->get_attribute('value');
+}
+
 =head2 is_displayed
 
  Description: