[Koha-bugs] [Bug 14536] PageObject-pattern base implementation

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 17 10:35:17 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14536

Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #41023|0                           |1
        is obsolete|                            |

--- Comment #2 from Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi> ---
Created attachment 41052
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41052&action=edit
Bug 14536 - PageObject-pattern base implementation

This patch introduces:

-PageObject base class and example tests,
-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!

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list