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.22 by root, Wed Aug 29 08:15:05 2018 UTC vs.
Revision 1.23 by root, Wed Aug 29 08:16:32 2018 UTC

224(currently the session id and capabilities), not the endpoint information 224(currently the session id and capabilities), not the endpoint information
225itself. 225itself.
226 226
227The main use of this function is in conjunction with disabled 227The main use of this function is in conjunction with disabled
228C<autodelete>, to save a session to e.g., and restore it later. It could 228C<autodelete>, to save a session to e.g., and restore it later. It could
229presumably used for other applications, suhc as using the same sssion from 229presumably used for other applications, such as using the same session
230multiple processes and so on. 230from multiple processes and so on.
231 231
232=item $wd->load_session ($sessionstring) 232=item $wd->load_session ($sessionstring)
233 233
234=item $wd->set_session ($sessionid, $capabilities) 234=item $wd->set_session ($sessionid, $capabilities)
235 235
304successfully, and only one session can be created per WebDriver object. 304successfully, and only one session can be created per WebDriver object.
305 305
306On success, C<< $wd->{sid} >> is set to the session ID, and C<< 306On success, C<< $wd->{sid} >> is set to the session ID, and C<<
307$wd->{capabilities} >> is set to the returned capabilities. 307$wd->{capabilities} >> is set to the returned capabilities.
308 308
309Simple example of creatring a WebDriver object and a new session: 309Simple example of creating a WebDriver object and a new session:
310 310
311 my $wd = new AnyEvent::Selenium endpoint => "http://localhost:4545"; 311 my $wd = new AnyEvent::Selenium endpoint => "http://localhost:4545";
312 $wd->new_session ({}); 312 $wd->new_session ({});
313 313
314Real-world example with capability negotiation: 314Real-world example with capability negotiation:
538 $_[0]->post_ ("frame/parent" => undef, $_[1]); 538 $_[0]->post_ ("frame/parent" => undef, $_[1]);
539} 539}
540 540
541=item $rect = $wd->get_window_rect 541=item $rect = $wd->get_window_rect
542 542
543Return the current window rect, e.g.: 543Return the current window rect(angle), e.g.:
544 544
545 $rect = $wd->get_window_rect 545 $rect = $wd->get_window_rect
546 => { height => 1040, width => 540, x => 0, y => 0 } 546 => { height => 1040, width => 540, x => 0, y => 0 }
547 547
548=item $wd->set_window_rect ($rect) 548=item $wd->set_window_rect ($rect)
549 549
550Sets the window rect. 550Sets the window rect(angle).
551 551
552=cut 552=cut
553 553
554sub get_window_rect_ { 554sub get_window_rect_ {
555 $_[0]->get_ ("window/rect" => $_[1]); 555 $_[0]->get_ ("window/rect" => $_[1]);
1456 $self 1456 $self
1457} 1457}
1458 1458
1459=item $al->perform ($wd) 1459=item $al->perform ($wd)
1460 1460
1461Finaluses and compiles the list, if not done yet, and calls C<< 1461Finalises and compiles the list, if not done yet, and calls C<<
1462$wd->perform >> with it. 1462$wd->perform >> with it.
1463 1463
1464If C<$wd> is undef, and the action list was created using the C<< 1464If C<$wd> is undef, and the action list was created using the C<<
1465$wd->actions >> method, then perform it against that WebDriver object. 1465$wd->actions >> method, then perform it against that WebDriver object.
1466 1466

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines