[Koha-bugs] [Bug 14536] PageObject-pattern base implementation
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon May 8 16:58:45 CEST 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14536
Lari Taskula <lari.taskula at jns.fi> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #41534|0 |1
is obsolete| |
Attachment #41678|0 |1
is obsolete| |
Attachment #42435|0 |1
is obsolete| |
Attachment #42716|0 |1
is obsolete| |
Attachment #44410|0 |1
is obsolete| |
Attachment #47254|0 |1
is obsolete| |
--- Comment #24 from Lari Taskula <lari.taskula at jns.fi> ---
Created attachment 63245
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63245&action=edit
Bug 14536 - PageObject-pattern base implementation
This patch introduces:
-PageObject base classes for OPAC and Intra, and example tests. More example
tests
in Buugg 14540, where setting test context is easier.
-a interactive debug script to drive PageObjects more easily.
------------------
PageObjects are used to make robust and reusable integration test components to
test various front-end features. PageObjects load a Selenium::Remote::Driver
implementation, phantomjs by default and use this to do scripted user actions
in the browser,
eg. clicking HTML-elements, accepting popup dialogs, entering text to input
fields.
PageObjects encapsulate those very low-level operations into clear and easily
usable actions or services, like doPasswordLogin().
PageObjects also seamlessly deal with navigation from one page to another, eg.
my $mainpage = t::lib::Page::Mainpage->new();
$mainpage->doPasswordLogin('admin', '1234')->gotoPatrons()->
searchPatrons({keywordSearch => "Jane Doe"});
PageObjects make doing integration tests so great!
You can google for the specifics of PageObject patterns and there are a ton of
great tutorials explaining their function.
Now PageObjects also have a debugging system where you can get the server
response in a title+cookies+html-dump and a screenshot of the browser session.
see t::lib::Page for more info!
---------------------
Interactive debugger at misc/devel/interactiveWebDriverShell.pl loads the
desired PageObject with the needed parameters to the debugger context and makes
dynamic UserAgent scripting easy and fun!
---------------------
Bug 14536: (follow-up) Adds polling to Page.pm and enhances navigation.
This follow-up adds a subroutine poll to superclass Page.pm. Polling will
execute an anonymous subroutine for as long as defined or until the subroutine
is successful.
---------------------
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list