CanSetWebdriverContext.pm 808 B

123456789101112131415161718192021222324252627282930
  1. package Selenium::Remote::Driver::CanSetWebdriverContext;
  2. # ABSTRACT: Customize the webdriver context prefix for various drivers
  3. use strict;
  4. use warnings;
  5. use Moo::Role;
  6. =head1 DESCRIPTION
  7. Some drivers don't use the typical C</wd/hub> context prefix for the
  8. webdriver HTTP communication. For example, the newer versions of the
  9. Firefox driver extension use the context C</hub> instead. This role
  10. just has the one attribute with a default webdriver context prefix,
  11. and is consumed in L<Selenium::Remote::Driver> and
  12. L<Selenium::Remote::RemoteConnection>.
  13. If you're new to webdriver, you probably want to head over to
  14. L<Selenium::Remote::Driver>'s docs; this package is more of an
  15. internal-facing concern.
  16. =cut
  17. has 'wd_context_prefix' => (
  18. is => 'lazy',
  19. default => sub { '/wd/hub' }
  20. );
  21. 1;