NAME
Kernel::Test::Role::Selenium::HandlesPages – role to interact with the current page (e.g. to check page source content).
LoadPage()
Loads a page given by an URL. Supports the WaitFor feature (as hash or array structure).
$Test->LoadPage(
URL => 'agent/ticket/1',
WaitFor => {
TestFlag => 'Form::Invalid',
or
ElementExists => '//div[contains(@class, "BusinessObjectTable")]',
},
or
WaitFor => [
{
TestFlag => 'Form::Invalid',
},
{
ElementExists => '//div[contains(@class, "BusinessObjectTable")]',
},
],
);
RefreshPage()
Loads a page given by an URL. Supports the WaitFor feature (as hash or array structure).
$Test->RefreshPage(
WaitFor => {
TestFlag => 'Form::Invalid',
or
ElementExists => '//div[contains(@class, "BusinessObjectTable")]',
},
or
WaitFor => [
{
TestFlag => 'Form::Invalid',
},
{
ElementExists => '//div[contains(@class, "BusinessObjectTable")]',
},
],
);
PageSourceCheckText()
Test if a text is inside the current page source content or not.
$Test->PageSourceCheckText(
Text => 'Example',
IsMissing => 1, # optional, default: 0
);
CheckErrorPage()
Checks error page.
$Self->CheckErrorPage(
ErrorCode => '403', # displayed error code
ErrorTitle => 'Forbidden', # displayed error title
ErrorMessage => 'No permission', # displayed error message
);