Selenium::PageObject - Selenium's PageObject pattern in Perl. Now your module @ISA pageObject!
This module is intended to be a base for PageObjects. It abstracts a good deal of the things required to get/set various page inputs, and provides callback hooks so you can do special things like wait for JS. It also is driver agnostic -- use WWW::Selenium or Selenium::Remote::Driver if you want. I recommend Selenium::Remote::Driver due to it having a more complete feature set.
Refer to the other module in this distribution Selenium::Element for the rest.
Create a new PageObject using the provided driver, and navigate to the provided URI. If you have subclassed your driver, you will need to override this method to not do it's strict driver class checks.
INPUTS:
DRIVER (WWW::Selenium or Selenium::Remote::Driver) - The driver object
URI (STRING) - the page this object should fiddle with (saved as $self->{'page'})
OUTPUT:
new Selenium::PageObject object
The base selenium driver is available to you here.
Get the first element matching the provided selector and selector type. Refer to your driver's documentation as to valid types.
SELECTOR (STRING) - Instructions for finding some element on the page
SELECTORTYPE (STRING) - Specifiation by which above instructions are parsed
new Selenium::Element object
Get the elements matching the provided selector and selector type. Refer to your driver's documentation as to valid types. WWW::Selenium is designed to work with single elements, so this method will fail when using it. Consider refining your selectors and looping instead.
array of new Selenium::Element objects
Send a tab to the page, to test tab navigation, or to de-focus the current element (useful for lose focus listeners, etc).
WWW::Selenium
Selenium::Remote::Driver
https://code.google.com/p/selenium/wiki/PageFactory for info about PageFactories, like this
https://code.google.com/p/selenium/wiki/PageObjects for more info about page objects themselves.
George S. Baugh <teodesian@cpan.org>
cPanel, Inc. graciously funded the initial work on this Module.
This software is copyright (c) 2014 by George S. Baugh.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Selenium::PageObject, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Selenium::PageObject
CPAN shell
perl -MCPAN -e shell install Selenium::PageObject
For more information on module installation, please visit the detailed CPAN module installation guide.