ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-WebDriver/WebDriver.pm
(Generate patch)

Comparing AnyEvent-WebDriver/WebDriver.pm (file contents):
Revision 1.6 by root, Tue Aug 28 23:11:12 2018 UTC vs.
Revision 1.7 by root, Tue Aug 28 23:19:41 2018 UTC

226(e.g. C<capabilities>). 226(e.g. C<capabilities>).
227 227
228No session-dependent methods must be called before this function returns 228No session-dependent methods must be called before this function returns
229successfully. 229successfully.
230 230
231On success, C<< $wd->{sid} >> is set to the session id, and C<< 231On success, C<< $wd->{sid} >> is set to the session ID, and C<<
232$wd->{capabilities} >> is set to the returned capabilities. 232$wd->{capabilities} >> is set to the returned capabilities.
233 233
234 my $wd = new AnyEvent::Selenium endpoint => "http://localhost:4545"; 234 my $wd = new AnyEvent::Selenium endpoint => "http://localhost:4545";
235 235
236 $wd->new_session ({ 236 $wd->new_session ({
476=cut 476=cut
477 477
478=item $element_id = $wd->find_element ($location_strategy, $selector) 478=item $element_id = $wd->find_element ($location_strategy, $selector)
479 479
480Finds the first element specified by the given selector and returns its 480Finds the first element specified by the given selector and returns its
481web element id (the strong, not the object from the protocol). Raises an 481web element ID (the strong, not the object from the protocol). Raises an
482error when no element was found. 482error when no element was found.
483 483
484 $element = $wd->find_element ("css selector" => "body a"); 484 $element = $wd->find_element ("css selector" => "body a");
485 $element = $wd->find_element ("link text" => "Click Here For Porn"); 485 $element = $wd->find_element ("link text" => "Click Here For Porn");
486 $element = $wd->find_element ("partial link text" => "orn"); 486 $element = $wd->find_element ("partial link text" => "orn");
894=cut 894=cut
895 895
896=item $object = $wd->element_object ($element_id) 896=item $object = $wd->element_object ($element_id)
897 897
898Encoding element ids in data structures is done by represetning them as an 898Encoding element ids in data structures is done by represetning them as an
899object with a special key and the element id as value. This helper method 899object with a special key and the element ID as value. This helper method
900does this for you. 900does this for you.
901 901
902=cut 902=cut
903 903
904sub element_object { 904sub element_object {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines