// Path: src/main/java/org/robotframework/formslibrary/operator/StatusBarOperator.java
// public class StatusBarOperator extends AbstractRootComponentOperator {
// 
//     /**
//      * Create a new operator for the default status bar.
//      */
//     public StatusBarOperator() {
//         super(new ByComponentTypeChooser(0, ComponentType.STATUS_BAR));
//     }
// 
//     /**
//      * @return the main message displayed in the status bar.
//      */
//     public String getMessage() {
// 
//         Object[] statusBarItems = (Object[]) ObjectUtil.invokeMethod(getSource(), "getItems()");
//         String result = "";
//         for (int i = 0; i < statusBarItems.length; i++) {
//             if (ComponentType.STATUS_BAR_TEXT_ITEM.matches(statusBarItems[i])) {
//                 result = ObjectUtil.getString(statusBarItems[i], "getText()");
//                 Logger.info("Found status message '" + result + "'");
//                 break;
//             }
//         }
//         return result;
//     }
// 
//     /**
//      * Verify that the given value is displayed in the status bar.
//      */
//     public void verifyValue(String value) {
//         String message = getMessage();
//         if (!TextUtil.matches(message, value)) {
//             throw new FormsLibraryException("Status Bar Message '" + message + "' does not match '" + value + "'.");
//         }
//     }
// 
// }


import org.robotframework.formslibrary.operator.StatusBarOperator;
import org.robotframework.javalib.annotation.ArgumentNames;
import org.robotframework.javalib.annotation.RobotKeyword;
import org.robotframework.javalib.annotation.RobotKeywords;

package org.robotframework.formslibrary.keyword;


@RobotKeywords
public class StatusBarKeywords {

    @RobotKeyword("Get the message that is displayed in the status bar at the bottom of the screen. \n\n Example:\n | Get Status Message |\n")
    public String getStatusMessage() {

// Path: src/main/java/org/robotframework/formslibrary/operator/StatusBarOperator.java
// public class StatusBarOperator extends AbstractRootComponentOperator {
// 
//     /**
//      * Create a new operator for the default status bar.
//      */
//     public StatusBarOperator() {
//         super(new ByComponentTypeChooser(0, ComponentType.STATUS_BAR));
//     }
// 
//     /**
//      * @return the main message displayed in the status bar.
//      */
//     public String getMessage() {
// 
//         Object[] statusBarItems = (Object[]) ObjectUtil.invokeMethod(getSource(), "getItems()");
//         String result = "";
//         for (int i = 0; i < statusBarItems.length; i++) {
//             if (ComponentType.STATUS_BAR_TEXT_ITEM.matches(statusBarItems[i])) {
//                 result = ObjectUtil.getString(statusBarItems[i], "getText()");
//                 Logger.info("Found status message '" + result + "'");
//                 break;
//             }
//         }
//         return result;
//     }
// 
//     /**
//      * Verify that the given value is displayed in the status bar.
//      */
//     public void verifyValue(String value) {
//         String message = getMessage();
//         if (!TextUtil.matches(message, value)) {
//             throw new FormsLibraryException("Status Bar Message '" + message + "' does not match '" + value + "'.");
//         }
//     }
// 
// }


// Path: src/main/java/org/robotframework/formslibrary/keyword/StatusBarKeywords.java
import org.robotframework.formslibrary.operator.StatusBarOperator;
import org.robotframework.javalib.annotation.ArgumentNames;
import org.robotframework.javalib.annotation.RobotKeyword;
import org.robotframework.javalib.annotation.RobotKeywords;

package org.robotframework.formslibrary.keyword;


@RobotKeywords
public class StatusBarKeywords {

    @RobotKeyword("Get the message that is displayed in the status bar at the bottom of the screen. \n\n Example:\n | Get Status Message |\n")
    public String getStatusMessage() {

        return new StatusBarOperator().getMessage();
