1
0

Driver.pm 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  1. use strict;
  2. use warnings;
  3. package Test::Selenium::Remote::Driver;
  4. use parent 'Selenium::Remote::Driver';
  5. # ABSTRACT: Useful testing subclass for Selenium::Remote::Driver
  6. use Test::Selenium::Remote::WebElement;
  7. use Test::More;
  8. use Test::Builder;
  9. use Test::LongString;
  10. use IO::Socket;
  11. our $AUTOLOAD;
  12. my $Test = Test::Builder->new;
  13. $Test->exported_to(__PACKAGE__);
  14. my %comparator = (
  15. is => 'is_eq',
  16. isnt => 'isnt_eq',
  17. like => 'like',
  18. unlike => 'unlike',
  19. );
  20. my $comparator_keys = join '|', keys %comparator;
  21. # These commands don't require a locator
  22. my %no_locator = map { $_ => 1 }
  23. qw( alert_text current_window_handle current_url
  24. title page_source body location path);
  25. sub no_locator {
  26. my $self = shift;
  27. my $method = shift;
  28. return $no_locator{$method};
  29. }
  30. sub AUTOLOAD {
  31. my $name = $AUTOLOAD;
  32. $name =~ s/.*:://;
  33. return if $name eq 'DESTROY';
  34. my $self = $_[0];
  35. my $sub;
  36. if ($name =~ /(\w+)_($comparator_keys)$/i) {
  37. my $getter = "get_$1";
  38. my $comparator = $comparator{lc $2};
  39. # make a subroutine that will call Test::Builder's test methods
  40. # with driver data from the getter
  41. if ($self->no_locator($1)) {
  42. $sub = sub {
  43. my( $self, $str, $name ) = @_;
  44. diag "Test::Selenium::Remote::Driver running no_locator $getter (@_[1..$#_])"
  45. if $self->{verbose};
  46. $name = "$getter, '$str'"
  47. if $self->{default_names} and !defined $name;
  48. no strict 'refs';
  49. my $rc = $Test->$comparator( $self->$getter, $str, $name );
  50. if (!$rc && $self->error_callback) {
  51. &{$self->error_callback}($name);
  52. }
  53. return $rc;
  54. };
  55. }
  56. else {
  57. $sub = sub {
  58. my( $self, $locator, $str, $name ) = @_;
  59. diag "Test::Selenium::Remote::Driver running with locator $getter (@_[1..$#_])"
  60. if $self->{verbose};
  61. $name = "$getter, $locator, '$str'"
  62. if $self->{default_names} and !defined $name;
  63. no strict 'refs';
  64. no strict 'refs';
  65. my $rc = $Test->$comparator( $self->$getter($locator), $str, $name );
  66. if (!$rc && $self->error_callback) {
  67. &{$self->error_callback}($name);
  68. }
  69. return $rc;
  70. };
  71. }
  72. }
  73. elsif ($name =~ /(\w+?)_?ok$/i) {
  74. my $cmd = $1;
  75. # make a subroutine for ok() around the selenium command
  76. # TODO: fix the thing for get_ok, it won't work as its arg get
  77. # pop'd in $name (so the call to get has no args => end of game)
  78. $sub = sub {
  79. my $self = shift;
  80. my $name = (@_ > 1 ? pop @_ : $cmd);
  81. my ($arg1, $arg2) = @_;
  82. if ($self->{default_names} and !defined $name) {
  83. $name = $cmd;
  84. $name .= ", $arg1" if defined $arg1;
  85. $name .= ", $arg2" if defined $arg2;
  86. }
  87. diag "Test::Selenium::Remote::Driver running _ok $cmd (@_[1..$#_])"
  88. if $self->{verbose};
  89. local $Test::Builder::Level = $Test::Builder::Level + 1;
  90. my $rc = '';
  91. eval { $rc = $self->$cmd( $arg1, $arg2 ) };
  92. die $@ if $@ and $@ =~ /Can't locate object method/;
  93. diag($@) if $@;
  94. $rc = ok( $rc, $name );
  95. if (!$rc && $self->error_callback) {
  96. &{$self->error_callback}($name);
  97. }
  98. return $rc;
  99. };
  100. }
  101. # jump directly to the new subroutine, avoiding an extra frame stack
  102. if ($sub) {
  103. no strict 'refs';
  104. *{$AUTOLOAD} = $sub;
  105. goto &$AUTOLOAD;
  106. }
  107. else {
  108. # try to pass through to Selenium::Remote::Driver
  109. my $sel = 'Selenium::Remote::Driver';
  110. my $sub = "${sel}::${name}";
  111. goto &$sub if exists &$sub;
  112. my ($package, $filename, $line) = caller;
  113. die qq(Can't locate object method "$name" via package ")
  114. . __PACKAGE__
  115. . qq(" (also tried "$sel") at $filename line $line\n);
  116. }
  117. }
  118. sub error_callback {
  119. my ($self, $cb) = @_;
  120. if (defined($cb)) {
  121. $self->{error_callback} = $cb;
  122. }
  123. return $self->{error_callback};
  124. }
  125. =head1 NAME
  126. Test::Selenium::Remote::Driver
  127. =head1 DESCRIPTION
  128. A subclass of L<Selenium::Remote::Driver>. which provides useful testing
  129. functions.
  130. This is an I<experimental> addition to the Selenium::Remote::Driver
  131. distribution, and some interfaces may change.
  132. =head1 Methods
  133. =head2 new ( %opts )
  134. This will create a new Test::Selenium::Remote::Driver object, which subclasses
  135. L<Selenium::Remote::Driver>. This subclass provides useful testing
  136. functions. It is modeled on L<Test::WWW::Selenium>.
  137. Environment vars can be used to specify options to pass to
  138. L<Selenium::Remote::Driver>. ENV vars are prefixed with C<TWD_>.
  139. ( After the old fork name, "Test::WebDriver" )
  140. Set the Selenium server address with C<$TWD_HOST> and C<$TWD_PORT>.
  141. Pick which browser is used using the C<$TWD_BROWSER>, C<$TWD_VERSION>,
  142. C<$TWD_PLATFORM>, C<$TWD_JAVASCRIPT>, C<$TWD_EXTRA_CAPABILITIES>.
  143. See L<Selenium::Driver::Remote> for the meanings of these options.
  144. =cut
  145. sub new {
  146. my ($class, %p) = @_;
  147. for my $opt (qw/remote_server_addr port browser_name version platform
  148. javascript auto_close extra_capabilities/) {
  149. $p{$opt} //= $ENV{ 'TWD_' . uc($opt) };
  150. }
  151. $p{browser_name} //= $ENV{TWD_BROWSER}; # ykwim
  152. $p{remote_server_addr} //= $ENV{TWD_HOST}; # ykwim
  153. $p{webelement_class} //= 'Test::Selenium::Remote::WebElement';
  154. my $self = $class->SUPER::new(%p);
  155. $self->{verbose} = $p{verbose};
  156. return $self;
  157. }
  158. =head2 server_is_running( $host, $port )
  159. Returns true if a Selenium server is running. The host and port
  160. parameters are optional, and default to C<localhost:4444>.
  161. Environment vars C<TWD_HOST> and C<TWD_PORT> can also be used to
  162. determine the server to check.
  163. =cut
  164. sub server_is_running {
  165. my $class_or_self = shift;
  166. my $host = $ENV{TWD_HOST} || shift || 'localhost';
  167. my $port = $ENV{TWD_PORT} || shift || 4444;
  168. return ($host, $port) if IO::Socket::INET->new(
  169. PeerAddr => $host,
  170. PeerPort => $port,
  171. );
  172. return;
  173. }
  174. =head1 Testing Methods
  175. The following testing methods are available. For
  176. more documentation, see the related test methods in L<Selenium::Remote::Driver>
  177. (And feel free to submit a patch to flesh out the documentation for these here).
  178. alert_text_is
  179. alert_text_isnt
  180. alert_text_like
  181. alert_text_unlike
  182. current_window_handle_is
  183. current_window_handle_isnt
  184. current_window_handle_like
  185. current_window_handle_unlike
  186. window_handles_is
  187. window_handles_isnt
  188. window_handles_like
  189. window_handles_unlike
  190. window_size_is
  191. window_size_isnt
  192. window_size_like
  193. window_size_unlike
  194. window_position_is
  195. window_position_isnt
  196. window_position_like
  197. window_position_unlike
  198. current_url_is
  199. current_url_isnt
  200. current_url_like
  201. current_url_unlike
  202. title_is
  203. title_isnt
  204. title_like
  205. title_unlike
  206. active_element_is
  207. active_element_isnt
  208. active_element_like
  209. active_element_unlike
  210. # Basically the same as 'content_like()', but content_like() supports multiple regex's.
  211. page_source_is
  212. page_source_isnt
  213. page_source_like
  214. page_source_unlike
  215. send_keys_to_active_element_ok
  216. send_keys_to_alert_ok
  217. send_keys_to_prompt_ok
  218. send_modifier_ok
  219. accept_alert_ok
  220. dismiss_alert_ok
  221. move_mouse_to_location_ok # TODO
  222. move_to_ok # TODO
  223. get_ok
  224. go_back_ok
  225. go_forward_ok
  226. add_cookie_ok
  227. get_page_source_ok
  228. find_element_ok($search_target)
  229. find_element_ok($search_target)
  230. find_elements_ok
  231. find_child_element_ok
  232. find_child_elements_ok
  233. compare_elements_ok
  234. click_ok
  235. double_click_ok
  236. =head2 $twd->type_element_ok($search_target, $keys, [, $desc ]);
  237. $twd->type_element_ok( $search_target, $keys [, $desc ] );
  238. Use L<Selenium::Remote::Driver/find_element> to resolve the C<$search_target>
  239. to a web element, and then type C<$keys> into it, providing an optional test
  240. label.
  241. Currently, other finders besides the default are not supported for C<type_ok()>.
  242. =cut
  243. sub type_element_ok {
  244. my $self = shift;
  245. my $locator = shift;
  246. my $keys = shift;
  247. my $desc = shift;
  248. return $self->find_element($locator)->send_keys_ok($keys,$desc);
  249. }
  250. =head2 $twd->find_element_ok($search_target [, $desc ]);
  251. $twd->find_element_ok( $search_target [, $desc ] );
  252. Returns true if C<$search_target> is successfully found on the page. L<$search_target>
  253. is passed to L<Selenium::Remote::Driver/find_element> using the C<default_finder>. See
  254. there for more details on the format. Currently, other finders besides the default are not supported
  255. for C<find_element_ok()>.
  256. =cut
  257. # Eventually, it would be nice to support other finds like Test::WWW::Selenium does, like this:
  258. # 'xpath=//foo', or 'css=.foo', etc.
  259. =head2 $twd->find_no_element_ok($search_target [, $desc ]);
  260. $twd->find_no_element_ok( $search_target [, $desc ] );
  261. Returns true if C<$search_target> is I<not> found on the page. L<$search_target>
  262. is passed to L<Selenium::Remote::Driver/find_element> using the C<default_finder>. See
  263. there for more details on the format. Currently, other finders besides the default are not supported
  264. for C<find_no_element_ok()>.
  265. =cut
  266. sub find_no_element_ok {
  267. my $self = shift;
  268. my $search_target = shift;
  269. my $desc = shift;
  270. local $Test::Builder::Level = $Test::Builder::Level +1;
  271. eval { $self->find_element($search_target) };
  272. ok((defined $@),$desc);
  273. }
  274. =head2 $twd->content_like( $regex [, $desc ] )
  275. $twd->content_like( $regex [, $desc ] )
  276. $twd->content_like( [$regex_1, $regex_2] [, $desc ] )
  277. Tells if the content of the page matches I<$regex>. If an arrayref of regex's
  278. are provided, one 'test' is run for each regex against the content of the
  279. current page.
  280. A default description of 'Content is like "$regex"' will be provided if there
  281. is no description.
  282. =cut
  283. sub content_like {
  284. my $self = shift;
  285. my $regex = shift;
  286. my $desc = shift;
  287. local $Test::Builder::Level = $Test::Builder::Level + 1;
  288. my $content = $self->get_page_source();
  289. if (not ref $regex eq 'ARRAY') {
  290. my $desc = qq{Content is like "$regex"} if (not defined $desc);
  291. return like_string($content , $regex, $desc );
  292. }
  293. elsif (ref $regex eq 'ARRAY') {
  294. for my $re (@$regex) {
  295. my $desc = qq{Content is like "$re"} if (not defined $desc);
  296. like_string($content , $re, $desc );
  297. }
  298. }
  299. }
  300. =head2 $twd->content_unlike( $regex [, $desc ] )
  301. $twd->content_unlike( $regex [, $desc ] )
  302. $twd->content_unlike( [$regex_1, $regex_2] [, $desc ] )
  303. Tells if the content of the page does NOT match I<$regex>. If an arrayref of regex's
  304. are provided, one 'test' is run for each regex against the content of the
  305. current page.
  306. A default description of 'Content is unlike "$regex"' will be provided if there
  307. is no description.
  308. =cut
  309. sub content_unlike {
  310. my $self = shift;
  311. my $regex = shift;
  312. my $desc = shift;
  313. local $Test::Builder::Level = $Test::Builder::Level + 1;
  314. my $content = $self->get_page_source();
  315. if (not ref $regex eq 'ARRAY') {
  316. my $desc = qq{Content is unlike "$regex"} if (not defined $desc);
  317. return unlike_string($content , $regex, $desc );
  318. }
  319. elsif (ref $regex eq 'ARRAY') {
  320. for my $re (@$regex) {
  321. my $desc = qq{Content is unlike "$re"} if (not defined $desc);
  322. unlike_string($content , $re, $desc );
  323. }
  324. }
  325. }
  326. =head2 $twd->body_text_like( $regex [, $desc ] )
  327. $twd->body_text_like( $regex [, $desc ] )
  328. $twd->body_text_like( [$regex_1, $regex_2] [, $desc ] )
  329. Tells if the text of the page (as returned by C<< get_body() >>) matches
  330. I<$regex>. If an arrayref of regex's are provided, one 'test' is run for each
  331. regex against the content of the current page.
  332. A default description of 'Content is like "$regex"' will be provided if there
  333. is no description.
  334. To also match the HTML see, C<< content_unlike() >>.
  335. =cut
  336. sub body_text_like {
  337. my $self = shift;
  338. my $regex = shift;
  339. my $desc = shift;
  340. local $Test::Builder::Level = $Test::Builder::Level + 1;
  341. my $text = $self->get_body();
  342. if (not ref $regex eq 'ARRAY') {
  343. my $desc = qq{Text is like "$regex"} if (not defined $desc);
  344. return like_string($text , $regex, $desc );
  345. }
  346. elsif (ref $regex eq 'ARRAY') {
  347. for my $re (@$regex) {
  348. my $desc = qq{Text is like "$re"} if (not defined $desc);
  349. like_string($text , $re, $desc );
  350. }
  351. }
  352. }
  353. =head2 $twd->body_text_unlike( $regex [, $desc ] )
  354. $twd->body_text_unlike( $regex [, $desc ] )
  355. $twd->body_text_unlike( [$regex_1, $regex_2] [, $desc ] )
  356. Tells if the text of the page (as returned by C<< get_body() >>)
  357. does NOT match I<$regex>. If an arrayref of regex's
  358. are provided, one 'test' is run for each regex against the content of the
  359. current page.
  360. A default description of 'Text is unlike "$regex"' will be provided if there
  361. is no description.
  362. To also match the HTML see, C<< content_unlike() >>.
  363. =cut
  364. sub body_text_unlike {
  365. my $self = shift;
  366. my $regex = shift;
  367. my $desc = shift;
  368. local $Test::Builder::Level = $Test::Builder::Level + 1;
  369. my $text = $self->get_body();
  370. if (not ref $regex eq 'ARRAY') {
  371. my $desc = qq{Text is unlike "$regex"} if (not defined $desc);
  372. return unlike_string($text , $regex, $desc );
  373. }
  374. elsif (ref $regex eq 'ARRAY') {
  375. for my $re (@$regex) {
  376. my $desc = qq{Text is unlike "$re"} if (not defined $desc);
  377. unlike_string($text , $re, $desc );
  378. }
  379. }
  380. }
  381. #####
  382. =head2 $twd->content_contains( $str [, $desc ] )
  383. $twd->content_contains( $str [, $desc ] )
  384. $twd->content_contains( [$str_1, $str_2] [, $desc ] )
  385. Tells if the content of the page contains I<$str>. If an arrayref of strngs's
  386. are provided, one 'test' is run for each string against the content of the
  387. current page.
  388. A default description of 'Content contains "$str"' will be provided if there
  389. is no description.
  390. =cut
  391. sub content_contains {
  392. my $self = shift;
  393. my $str = shift;
  394. my $desc = shift;
  395. local $Test::Builder::Level = $Test::Builder::Level + 1;
  396. my $content = $self->get_page_source();
  397. if (not ref $str eq 'ARRAY') {
  398. my $desc = qq{Content contains "$str"} if (not defined $desc);
  399. return contains_string($content , $str, $desc );
  400. }
  401. elsif (ref $str eq 'ARRAY') {
  402. for my $s (@$str) {
  403. my $desc = qq{Content contains "$s"} if (not defined $desc);
  404. contains_string($content , $s, $desc );
  405. }
  406. }
  407. }
  408. =head2 $twd->content_lacks( $str [, $desc ] )
  409. $twd->content_lacks( $str [, $desc ] )
  410. $twd->content_lacks( [$str_1, $str_2] [, $desc ] )
  411. Tells if the content of the page does NOT contain I<$str>. If an arrayref of strings
  412. are provided, one 'test' is run for each string against the content of the
  413. current page.
  414. A default description of 'Content lacks "$str"' will be provided if there
  415. is no description.
  416. =cut
  417. sub content_lacks {
  418. my $self = shift;
  419. my $str = shift;
  420. my $desc = shift;
  421. local $Test::Builder::Level = $Test::Builder::Level + 1;
  422. my $content = $self->get_page_source();
  423. if (not ref $str eq 'ARRAY') {
  424. my $desc = qq{Content lacks "$str"} if (not defined $desc);
  425. return lacks_string($content , $str, $desc );
  426. }
  427. elsif (ref $str eq 'ARRAY') {
  428. for my $s (@$str) {
  429. my $desc = qq{Content lacks "$s"} if (not defined $desc);
  430. lacks_string($content , $s, $desc );
  431. }
  432. }
  433. }
  434. =head2 $twd->body_text_contains( $str [, $desc ] )
  435. $twd->body_text_contains( $str [, $desc ] )
  436. $twd->body_text_contains( [$str_1, $str_2] [, $desc ] )
  437. Tells if the text of the page (as returned by C<< get_body() >>) contains
  438. I<$str>. If an arrayref of strings are provided, one 'test' is run for each
  439. regex against the content of the current page.
  440. A default description of 'Text contains "$str"' will be provided if there
  441. is no description.
  442. To also match the HTML see, C<< content_uncontains() >>.
  443. =cut
  444. sub body_text_contains {
  445. my $self = shift;
  446. my $str = shift;
  447. my $desc = shift;
  448. local $Test::Builder::Level = $Test::Builder::Level + 1;
  449. my $text = $self->get_body();
  450. if (not ref $str eq 'ARRAY') {
  451. my $desc = qq{Text contains "$str"} if (not defined $desc);
  452. return contains_string($text , $str, $desc );
  453. }
  454. elsif (ref $str eq 'ARRAY') {
  455. for my $s (@$str) {
  456. my $desc = qq{Text contains "$s"} if (not defined $desc);
  457. contains_string($text , $s, $desc );
  458. }
  459. }
  460. }
  461. =head2 $twd->body_text_lacks( $str [, $desc ] )
  462. $twd->body_text_lacks( $str [, $desc ] )
  463. $twd->body_text_lacks( [$str_1, $str_2] [, $desc ] )
  464. Tells if the text of the page (as returned by C<< get_body() >>)
  465. does NOT contain I<$str>. If an arrayref of strings
  466. are provided, one 'test' is run for each regex against the content of the
  467. current page.
  468. A default description of 'Text is lacks "$str"' will be provided if there
  469. is no description.
  470. To also match the HTML see, C<< content_lacks() >>.
  471. =cut
  472. sub body_text_lacks {
  473. my $self = shift;
  474. my $str = shift;
  475. my $desc = shift;
  476. local $Test::Builder::Level = $Test::Builder::Level + 1;
  477. my $text = $self->get_body();
  478. if (not ref $str eq 'ARRAY') {
  479. my $desc = qq{Text is lacks "$str"} if (not defined $desc);
  480. return lacks_string($text , $str, $desc );
  481. }
  482. elsif (ref $str eq 'ARRAY') {
  483. for my $s (@$str) {
  484. my $desc = qq{Text is lacks "$s"} if (not defined $desc);
  485. lacks_string($text , $s, $desc );
  486. }
  487. }
  488. }
  489. =head2 $twd->element_text_is($search_target,$expected_text [,$desc]);
  490. $twd->element_text_is($search_target,$expected_text [,$desc]);
  491. =cut
  492. sub element_text_is {
  493. my ($self,$search_target,$expected,$desc) = @_;
  494. return $self->find_element($search_target)->text_is($expected,$desc);
  495. }
  496. =head2 $twd->element_value_is($search_target,$expected_value [,$desc]);
  497. $twd->element_value_is($search_target,$expected_value [,$desc]);
  498. =cut
  499. sub element_value_is {
  500. my ($self,$search_target,$expected,$desc) = @_;
  501. return $self->find_element($search_target)->value_is($expected,$desc);
  502. }
  503. =head2 $twd->click_element_ok($search_target [,$desc]);
  504. $twd->click_element_ok($search_target [,$desc]);
  505. Find an element and then click on it.
  506. =cut
  507. sub click_element_ok {
  508. my ($self,$search_target,$desc) = @_;
  509. return $self->find_element($search_target)->click_ok($desc);
  510. }
  511. =head2 $twd->clear_element_ok($search_target [,$desc]);
  512. $twd->clear_element_ok($search_target [,$desc]);
  513. Find an element and then clear on it.
  514. =cut
  515. sub clear_element_ok {
  516. my ($self,$search_target,$desc) = @_;
  517. return $self->find_element($search_target)->clear_ok($desc);
  518. }
  519. =head2 $twd->is_element_displayed_ok($search_target [,$desc]);
  520. $twd->is_element_displayed_ok($search_target [,$desc]);
  521. Find an element and check to confirm that it is displayed. (visible)
  522. =cut
  523. sub is_element_displayed_ok {
  524. my ($self,$search_target,$desc) = @_;
  525. return $self->find_element($search_target)->is_displayed_ok($desc);
  526. }
  527. =head2 $twd->is_element_enabled_ok($search_target [,$desc]);
  528. $twd->is_element_enabled_ok($search_target [,$desc]);
  529. Find an element and check to confirm that it is enabled.
  530. =cut
  531. sub is_element_enabled_ok {
  532. my ($self,$search_target,$desc) = @_;
  533. return $self->find_element($search_target)->is_enabled_ok($desc);
  534. }
  535. 1;
  536. __END__
  537. =head1 NOTES
  538. This module was forked from Test::WebDriver 0.01.
  539. For Best Practice - I recommend subclassing Test::Selenium::Remote::Driver for your application,
  540. and then refactoring common or app specific methods into MyApp::WebDriver so that
  541. your test files do not have much duplication. As your app changes, you can update
  542. MyApp::WebDriver rather than all the individual test files.
  543. =head1 AUTHORS
  544. =over 4
  545. =item *
  546. Created by: Luke Closs <lukec@cpan.org>, but inspired by
  547. L<Test::WWW::Selenium> and its authors.
  548. =back
  549. =head1 CONTRIBUTORS
  550. Test::WebDriver work was sponsored by Prime Radiant, Inc.
  551. Mark Stosberg <mark@stosberg.com> forked it as Test::Selenium::Remote::Driver
  552. and significantly expanded it.
  553. =head1 COPYRIGHT AND LICENSE
  554. Parts Copyright (c) 2012 Prime Radiant, Inc.
  555. This program is free software; you can redistribute it and/or
  556. modify it under the same terms as Perl itself.