Kernel::Test::Role::Selenium::Agent::HandlesBusinessObjectWidgets

NAME

Kernel::Test::Role::Selenium::Agent::HandlesBusinessObjectWidgets – role to interact with widgets in Selenium tests.

BusinessObjectWidgetsDisableAll()

Temporary disable all widgets for a specific screen except the given ActiveWidgetName in the system configuration.

    $Test->BusinessObjectWidgetsDisableAll(
        WidgetSetting    => 'AgentFrotnend::SomeScreen::Widget',
        ActiveWidgetName => 'somename',
    );

BusinessObjectWidgetGetConfig()

Retrieves an specific widget configuration for a given user from the screen configuration.

    my $WidgetConfig = $Test->BusinessObjectWidgetGetConfig(
        ScreenType       => 'somescreentype',
        ColumnLayoutName => 'somename',         # (optional) e.g. OneColumn
        ColumnNumber     => 123,                # (optional)
        WidgetName       => 'somename',
        UserID           => 123,
    );

returns

    $WidgetConfig = {
        IsVisible => 1,
        ID        => 'e70f8fc6-d2ad-11ea-8c53-934023171195',
        Name      => 'somename',
        Active    => 1,
        Config => {
            Collapsed           => 0,
            Hidden              => 0,
            Properties          => [ ],
            ShowPropertyOnEmpty => 0,
        },
        Type                    => 'sometype',
        IsAlwaysPresent         => 0,
        IsDuplicatable          => 0,
        Title                   => 'sometitle',
    };

BusinessObjectWidgetGetSelector()

Generates CSS or XPath selector for a given widget id.

    my $WidgetSelector = $Test->BusinessObjectWidgetGetSelector(
        WidgetID     => 'e70f8fc6',
        SelectorType => 'CSS',           # optional, 'CSS' or 'XPath', defaults to 'CSS'
    );

returns

    $WidgetSelector = 'div[data-widget-id="e70f8fc6"] '

or

    $WidgetSelector = '//div[@data-widget-id="e70f8fc6"]'

BusinessObjectWidgetCheckTitle()

Generates CSS or XPath selector for a given widget id.

    $Test->BusinessObjectWidgetCheckTitle(
        WidgetXPath       => '//somexpath',
        ExpectedTitle     => 'sometile',
        RemoveObjectCount => 1,                 # optional 1 || 0
        ObjectStr         => 'Tickets',         # required for RemoveObjectCount
    );

BusinessObjectWidgetIsDisplayed()

Checks if a widget is displayed.

    $Self->BusinessObjectWidgetIsDisplayed(
        Name => 'ProcessInformation',
        ID   => 'e70f8fc6',
    );

BusinessObjectWidgetIsHidden()

Checks if a widget is hidden.

    $Self->BusinessObjectWidgetIsHidden(
        Name => 'ProcessInformation',
        ID   => 'e70f8fc6',
    );

BusinessObjectWidgetOpenConfigFlyout()

Opens the widget configuration flyout.

    $Self->BusinessObjectWidgetOpenConfigFlyout(
        WidgetID => 'e70f8fc6',
    );

BusinessObjectWidgetSaveConfigFlyout()

Saves the widget configuration and closes flyout.

    $Self->BusinessObjectWidgetSaveConfigFlyout(
        WidgetID => 'e70f8fc6',
    );

BusinessObjectWidgetResetConfigFlyout()

Resets the widget configuration (opens and closes the flyout).

    $Self->BusinessObjectWidgetSaveConfigFlyout(
        WidgetID => 'e70f8fc6',
    );
Scroll to Top