Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MenuItems not showing up after press on MenuButton under Linux + Firefox #644

Open
sebage opened this issue Oct 14, 2024 · 3 comments
Open

Comments

@sebage
Copy link

sebage commented Oct 14, 2024

Describe the bug
In our application we have several locations with MenuButtons. When running the tests under Linux and Firefox, the MenuItems are not showing up on a press:

await browser.asControl(oControlSelector).press();
Control selectors:

    oControlSelector: {
        forceSelect: true,
        selector: {
            id: "application-serialnumber-analyze-component---detailFullscreenView--tableNavigationMenuButton"
        }
    },

also tried the internal button:

    oControlSelector:: {
        forceSelect: true,
        selector: {
            id: "application-serialnumber-analyze-component---detailFullscreenView--tableNavigationMenuButton-internalBtn",
            interaction: {
                    idSuffix: "BDI-content"
            }
        }
    },

For example in saucelabs i can see that the MenuButton is highlighted after the press, but the MenuItems don't show up:
Image

If i manually click on the button the items are appearing.
Image

On all other Browser / OS combination we use the issue is not reproducible (Windows/Chrome, Windows/Edge, Windows/Firefox, Linux/Chrome, Linux/Edge). Unfortunately the SAP internal test execution tool we use supports only Linux, that's why we can't just switch to execution on Windows.

To Reproduce
This issue was also reproducible with a sample app we got from UI5, unfortunately i can't access it anymore. I will try to find a public available example to reproduce, will update the ticket.

Expected behavior
Press on the MenuButton should show the MenuItems

Logs/Console Output
Relevant part of the logs when using 'tableNavigationMenuButton' as selector:

...
{
    "in_video_timeline": 73.5,
    "screenshot": null,
    "suggestion_values": [],
    "start_time": 1728917555.534879,
    "request_id": "d30f3369-5b05-4e72-ae87-751b5de4a79d",
    "request": {
      "script_checksum": "2ee6d4800ed585b512260276784abde0a1ac2a3605ceaada5edd22628381de9e",
      "args": [
        {
          "forceSelect": true,
          "selector": {
            "id": "application-serialnumber-analyze-component---detailFullscreenView--tableNavigationMenuButton"
          },
          "wdio_ui5_key": "applicationserialnumber-analyze-component---detailFullscreenView--tableNavigationMenuButton"
        }
      ],
      "script": "return ((controlSelector, done) => {\n        const waitForUI5Options = Object.assign({}, window.wdi5.waitForUI5Optio...TRUNCATED"
    },
    "HTTPStatus": 200,
    "visual_command": false,
    "result": {
      "className": "sap.m.Button",
      "status": 0,
      "aProtoFunctions": [
        "exit",
        "onkeydown",
        "getText",
        "setText",
        "getType",
        "setType",
        "getWidth",
        "setWidth",
        "getEnabled",
        "setEnabled",
        "getIcon",
        "setIcon",
        "getIconFirst",
        "setIconFirst",
        "getActiveIcon",
        "setActiveIcon",
        "getIconDensityAware",
        "setIconDensityAware",
        "getTextDirection",
        "setTextDirection",
        "getAriaHasPopup",
        "setAriaHasPopup",
        "getAccessibleRole",
        "setAccessibleRole",
        "getAriaDescribedBy",
        "addAriaDescribedBy",
        "removeAriaDescribedBy",
        "removeAllAriaDescribedBy",
        "getAriaLabelledBy",
        "addAriaLabelledBy",
        "removeAriaLabelledBy",
        "removeAllAriaLabelledBy",
        "attachTap",
        "detachTap",
        "fireTap",
        "attachPress",
        "detachPress",
        "firePress",
        "getMetadata",
        "useEnabledPropagator",
        "setContextMenu",
        "getContextMenu",
        "initBadgeEnablement",
        "updateBadgeValue",
        "addCustomData",
        "insertCustomData",
        "getBadgeCustomData",
        "getBadgeAnimationClass",
        "removeBadgeCustomData",
        "setBadgeAccentColor",
        "setBadgePosition",
        "updateBadgeVisibility",
        "updateBadgeAnimation",
        "badgeValueFormatter",
        "setBadgeMinValue",
        "setBadgeMaxValue",
        "onBadgeUpdate",
        "ontouchstart",
        "ontouchend",
        "ontouchcancel",
        "ontap",
        "onkeyup",
        "onfocusin",
        "onfocusout",
        "getPopupAnchorDomRef",
        "getAccessibilityInfo",
        "getBlocked",
        "setBlocked",
        "getBusy",
        "setBusy",
        "getBusyIndicatorDelay",
        "setBusyIndicatorDelay",
        "getBusyIndicatorSize",
        "setBusyIndicatorSize",
        "getVisible",
        "setVisible",
        "getFieldGroupIds",
        "setFieldGroupIds",
        "attachValidateFieldGroup",
        "detachValidateFieldGroup",
        "fireValidateFieldGroup",
        "clone",
        "addStyleClass",
        "removeStyleClass",
        "toggleStyleClass",
        "hasStyleClass",
        "isActive",
        "invalidate",
        "rerender",
        "getDomRef",
        "allowTextSelection",
        "attachBrowserEvent",
        "detachBrowserEvent",
        "placeAt",
        "onselectstart",
        "getIdForLabel",
        "destroy",
        "isBusy",
        "getControlsByFieldGroupId",
        "checkFieldGroupIds",
        "triggerValidateFieldGroup",
        "exec",
        "getTooltip",
        "setTooltip",
        "destroyTooltip",
        "getCustomData",
        "removeCustomData",
        "removeAllCustomData",
        "indexOfCustomData",
        "destroyCustomData",
        "getLayoutData",
        "setLayoutData",
        "destroyLayoutData",
        "getDependents",
        "addDependent",
        "insertDependent",
        "removeDependent",
        "removeAllDependents",
        "indexOfDependent",
        "destroyDependents",
        "getDragDropConfig",
        "addDragDropConfig",
        "insertDragDropConfig",
        "removeDragDropConfig",
        "removeAllDragDropConfig",
        "indexOfDragDropConfig",
        "destroyDragDropConfig",
        "register",
        "deregister",
        "getInterface",
        "toString",
        "prop",
        "setProperty",
        "getUIArea",
        "addDelegate",
        "removeDelegate",
        "addEventDelegate",
        "removeEventDelegate",
        "getFocusDomRef",
        "isFocusable",
        "focus",
        "getFocusInfo",
        "applyFocusInfo",
        "getTooltip_AsString",
        "getTooltip_Text",
        "data",
        "findElements",
        "bindElement",
        "unbindElement",
        "getElementBinding",
        "getDomRefForSetting",
        "attachValidationSuccess",
        "detachValidationSuccess",
        "fireValidationSuccess",
        "attachValidationError",
        "detachValidationError",
        "fireValidationError",
        "attachParseError",
        "detachParseError",
        "fireParseError",
        "attachFormatError",
        "detachFormatError",
        "fireFormatError",
        "attachModelContextChange",
        "detachModelContextChange",
        "fireModelContextChange",
        "applySettings",
        "getId",
        "getProperty",
        "validateProperty",
        "isPropertyInitial",
        "resetProperty",
        "getOriginInfo",
        "setAssociation",
        "getAssociation",
        "addAssociation",
        "removeAssociation",
        "removeAllAssociation",
        "validateAggregation",
        "setAggregation",
        "indexOfAggregation",
        "insertAggregation",
        "addAggregation",
        "removeAggregation",
        "removeAllAggregation",
        "destroyAggregation",
        "isInvalidateSuppressed",
        "setParent",
        "getParent",
        "isBinding",
        "extractBindingInfo",
        "getBindingInfo",
        "bindObject",
        "unbindObject",
        "bindContext",
        "unbindContext",
        "bindProperty",
        "unbindProperty",
        "updateProperty",
        "updateModelProperty",
        "bindAggregation",
        "unbindAggregation",
        "updateAggregation",
        "refreshAggregation",
        "propagateMessages",
        "isTreeBinding",
        "updateBindings",
        "isBound",
        "getObjectBinding",
        "getEventingParent",
        "getBinding",
        "getBindingPath",
        "setBindingContext",
        "setElementBindingContext",
        "updateBindingContext",
        "getBindingContext",
        "setModel",
        "addPropagationListener",
        "removePropagationListener",
        "getPropagationListeners",
        "propagateProperties",
        "getModel",
        "getOwnModels",
        "hasModel",
        "findAggregatedObjects",
        "onOwnerDeactivation",
        "onOwnerActivation",
        "isDestroyStarted",
        "isDestroyed",
        "attachEvent",
        "attachEventOnce",
        "detachEvent",
        "hasListeners",
        "isA",
        "toLocaleString",
        "valueOf",
        "hasOwnProperty",
        "isPrototypeOf",
        "propertyIsEnumerable"
      ],
      "id": "application-serialnumber-analyze-component---detailFullscreenView--tableNavigationMenuButton-internalBtn",
      "domElement": {
        "element-6066-11e4-a52e-4f735466cecf": "000df9e4-511e-4440-91e2-5a98d9438b42"
      }
    },
    "suggestion": null,
    "between_commands": 0.20136404037475586,
    "duration": 0.420090913772583,
    "path": "execute/async",
    "hide_from_ui": false,
    "method": "POST",
    "statusCode": 0
  },
  {
    "screenshot": null,
    "suggestion_values": [],
    "start_time": 1728917556.002677,
    "request": {
      "using": "xpath",
      "value": "//*[@id=\"application-serialnumber-analyze-component---detailFullscreenView--tableNavigationMenuButton-internalBtn\"]"
    },
    "result": {
      "element-6066-11e4-a52e-4f735466cecf": "000df9e4-511e-4440-91e2-5a98d9438b42"
    },
    "duration": 0.009586095809936523,
    "path": "element",
    "hide_from_ui": false,
    "between_commands": 0.04770708084106445,
    "visual_command": false,
    "HTTPStatus": 200,
    "suggestion": null,
    "request_id": "a9a93d7f-c482-43bb-a262-7275afd35bdf",
    "in_video_timeline": 73.75,
    "method": "POST",
    "statusCode": 0
  },
  {
    "screenshot": 8,
    "suggestion_values": [],
    "start_time": 1728917556.063583,
    "request": {},
    "result": null,
    "duration": 0.2921922206878662,
    "path": "element/000df9e4-511e-4440-91e2-5a98d9438b42/click",
    "hide_from_ui": false,
    "between_commands": 0.05131983757019043,
    "visual_command": false,
    "HTTPStatus": 200,
    "suggestion": null,
    "request_id": "4357b590-1f1d-4bb4-9ea1-8383c2ea10c5",
    "in_video_timeline": 74,
    "method": "POST",
    "statusCode": 0
  },
  {
    "in_video_timeline": 74.75,
    "screenshot": null,
    "suggestion_values": [],
    "start_time": 1728917556.736157,
    "request_id": "3d57066b-65bd-4d4e-9f53-a8895f21c359",
    "request": {
      "script_checksum": "2ee6d4800ed585b512260276784abde0a1ac2a3605ceaada5edd22628381de9e",
      "args": [
        {
          "forceSelect": true,
          "selector": {
            "id": "application-serialnumber-analyze-component---detailFullscreenView--tableNavigationUpStreamMenuItem-unifiedmenu",
            "searchOpenDialogs": true
          },
          "wdio_ui5_key": "applicationserialnumber-analyze-component---detailFullscreenView--tableNavigationUpStreamMenuItem-unifiedmenu"
        }
      ],
      "script": "return ((controlSelector, done) => {\n        const waitForUI5Options = Object.assign({}, window.wdi5.waitForUI5Optio...TRUNCATED"
    },
    "HTTPStatus": 200,
    "visual_command": false,
    "result": {
      "status": 1,
      "message": "Error: No DOM element found using the control selector {\"id\":\"application-serialnumber-analyze-component---detailFullscreenView--tableNavigationUpStreamMenuItem-unifiedmenu\",\"searchOpenDialogs\":true}"
    },
    "suggestion": null,
    "between_commands": 0.38038182258605957,
    "duration": 0.4196009635925293,
    "path": "execute/async",
    "hide_from_ui": false,
    "method": "POST",
    "statusCode": 0
  },
...

Logs when using 'tableNavigationMenuButton-internalBtn' as selector:

...
{
    "in_video_timeline": 84,
    "screenshot": null,
    "suggestion_values": [],
    "start_time": 1728916864.439238,
    "request_id": "91f02f24-d7c3-4319-ad0f-b9aeee13b011",
    "request": {
      "script_checksum": "2ee6d4800ed585b512260276784abde0a1ac2a3605ceaada5edd22628381de9e",
      "args": [
        {
          "forceSelect": true,
          "selector": {
            "interaction": {
              "idSuffix": "BDI-content"
            },
            "id": "application-serialnumber-analyze-component---detailFullscreenView--tableNavigationMenuButton-internalBtn"
          },
          "wdio_ui5_key": "applicationserialnumber-analyze-component---detailFullscreenView--tableNavigationMenuButton-internalBtn"
        }
      ],
      "script": "return ((controlSelector, done) => {\n        const waitForUI5Options = Object.assign({}, window.wdi5.waitForUI5Optio...TRUNCATED"
    },
    "HTTPStatus": 200,
    "visual_command": false,
    "result": {
      "className": "sap.m.Button",
      "status": 0,
      "aProtoFunctions": [
        "exit",
        "onkeydown",
        "getText",
        "setText",
        "getType",
        "setType",
        "getWidth",
        "setWidth",
        "getEnabled",
        "setEnabled",
        "getIcon",
        "setIcon",
        "getIconFirst",
        "setIconFirst",
        "getActiveIcon",
        "setActiveIcon",
        "getIconDensityAware",
        "setIconDensityAware",
        "getTextDirection",
        "setTextDirection",
        "getAriaHasPopup",
        "setAriaHasPopup",
        "getAccessibleRole",
        "setAccessibleRole",
        "getAriaDescribedBy",
        "addAriaDescribedBy",
        "removeAriaDescribedBy",
        "removeAllAriaDescribedBy",
        "getAriaLabelledBy",
        "addAriaLabelledBy",
        "removeAriaLabelledBy",
        "removeAllAriaLabelledBy",
        "attachTap",
        "detachTap",
        "fireTap",
        "attachPress",
        "detachPress",
        "firePress",
        "getMetadata",
        "useEnabledPropagator",
        "setContextMenu",
        "getContextMenu",
        "initBadgeEnablement",
        "updateBadgeValue",
        "addCustomData",
        "insertCustomData",
        "getBadgeCustomData",
        "getBadgeAnimationClass",
        "removeBadgeCustomData",
        "setBadgeAccentColor",
        "setBadgePosition",
        "updateBadgeVisibility",
        "updateBadgeAnimation",
        "badgeValueFormatter",
        "setBadgeMinValue",
        "setBadgeMaxValue",
        "onBadgeUpdate",
        "ontouchstart",
        "ontouchend",
        "ontouchcancel",
        "ontap",
        "onkeyup",
        "onfocusin",
        "onfocusout",
        "getPopupAnchorDomRef",
        "getAccessibilityInfo",
        "getBlocked",
        "setBlocked",
        "getBusy",
        "setBusy",
        "getBusyIndicatorDelay",
        "setBusyIndicatorDelay",
        "getBusyIndicatorSize",
        "setBusyIndicatorSize",
        "getVisible",
        "setVisible",
        "getFieldGroupIds",
        "setFieldGroupIds",
        "attachValidateFieldGroup",
        "detachValidateFieldGroup",
        "fireValidateFieldGroup",
        "clone",
        "addStyleClass",
        "removeStyleClass",
        "toggleStyleClass",
        "hasStyleClass",
        "isActive",
        "invalidate",
        "rerender",
        "getDomRef",
        "allowTextSelection",
        "attachBrowserEvent",
        "detachBrowserEvent",
        "placeAt",
        "onselectstart",
        "getIdForLabel",
        "destroy",
        "isBusy",
        "getControlsByFieldGroupId",
        "checkFieldGroupIds",
        "triggerValidateFieldGroup",
        "exec",
        "getTooltip",
        "setTooltip",
        "destroyTooltip",
        "getCustomData",
        "removeCustomData",
        "removeAllCustomData",
        "indexOfCustomData",
        "destroyCustomData",
        "getLayoutData",
        "setLayoutData",
        "destroyLayoutData",
        "getDependents",
        "addDependent",
        "insertDependent",
        "removeDependent",
        "removeAllDependents",
        "indexOfDependent",
        "destroyDependents",
        "getDragDropConfig",
        "addDragDropConfig",
        "insertDragDropConfig",
        "removeDragDropConfig",
        "removeAllDragDropConfig",
        "indexOfDragDropConfig",
        "destroyDragDropConfig",
        "register",
        "deregister",
        "getInterface",
        "toString",
        "prop",
        "setProperty",
        "getUIArea",
        "addDelegate",
        "removeDelegate",
        "addEventDelegate",
        "removeEventDelegate",
        "getFocusDomRef",
        "isFocusable",
        "focus",
        "getFocusInfo",
        "applyFocusInfo",
        "getTooltip_AsString",
        "getTooltip_Text",
        "data",
        "findElements",
        "bindElement",
        "unbindElement",
        "getElementBinding",
        "getDomRefForSetting",
        "attachValidationSuccess",
        "detachValidationSuccess",
        "fireValidationSuccess",
        "attachValidationError",
        "detachValidationError",
        "fireValidationError",
        "attachParseError",
        "detachParseError",
        "fireParseError",
        "attachFormatError",
        "detachFormatError",
        "fireFormatError",
        "attachModelContextChange",
        "detachModelContextChange",
        "fireModelContextChange",
        "applySettings",
        "getId",
        "getProperty",
        "validateProperty",
        "isPropertyInitial",
        "resetProperty",
        "getOriginInfo",
        "setAssociation",
        "getAssociation",
        "addAssociation",
        "removeAssociation",
        "removeAllAssociation",
        "validateAggregation",
        "setAggregation",
        "indexOfAggregation",
        "insertAggregation",
        "addAggregation",
        "removeAggregation",
        "removeAllAggregation",
        "destroyAggregation",
        "isInvalidateSuppressed",
        "setParent",
        "getParent",
        "isBinding",
        "extractBindingInfo",
        "getBindingInfo",
        "bindObject",
        "unbindObject",
        "bindContext",
        "unbindContext",
        "bindProperty",
        "unbindProperty",
        "updateProperty",
        "updateModelProperty",
        "bindAggregation",
        "unbindAggregation",
        "updateAggregation",
        "refreshAggregation",
        "propagateMessages",
        "isTreeBinding",
        "updateBindings",
        "isBound",
        "getObjectBinding",
        "getEventingParent",
        "getBinding",
        "getBindingPath",
        "setBindingContext",
        "setElementBindingContext",
        "updateBindingContext",
        "getBindingContext",
        "setModel",
        "addPropagationListener",
        "removePropagationListener",
        "getPropagationListeners",
        "propagateProperties",
        "getModel",
        "getOwnModels",
        "hasModel",
        "findAggregatedObjects",
        "onOwnerDeactivation",
        "onOwnerActivation",
        "isDestroyStarted",
        "isDestroyed",
        "attachEvent",
        "attachEventOnce",
        "detachEvent",
        "hasListeners",
        "isA",
        "toLocaleString",
        "valueOf",
        "hasOwnProperty",
        "isPrototypeOf",
        "propertyIsEnumerable"
      ],
      "id": "application-serialnumber-analyze-component---detailFullscreenView--tableNavigationMenuButton-internalBtn",
      "domElement": {
        "element-6066-11e4-a52e-4f735466cecf": "1874cc94-29c7-4a05-92d4-00b664430c9a"
      }
    },
    "suggestion": null,
    "between_commands": 0.07518815994262695,
    "duration": 0.4246799945831299,
    "path": "execute/async",
    "hide_from_ui": false,
    "method": "POST",
    "statusCode": 0
  },
  {
    "in_video_timeline": 84.5,
    "screenshot": null,
    "suggestion_values": [],
    "start_time": 1728916864.917713,
    "request_id": "09d1c583-e1ec-4b5e-aa61-522a7ffd0c86",
    "request": {
      "script_checksum": "8020ab4446a4095a4502334a7ea623aff307dff9e316fe1689a14f87f0e89777",
      "args": [
        {
          "interactionType": "PRESS",
          "selector": {
            "interaction": {
              "idSuffix": "BDI-content"
            },
            "id": "application-serialnumber-analyze-component---detailFullscreenView--tableNavigationMenuButton-internalBtn"
          }
        }
      ],
      "script": "return ((oOptions, done) => {\n        window.wdi5.waitForUI5(\n            window.wdi5.waitForUI5Options,\n           ...TRUNCATED"
    },
    "HTTPStatus": 200,
    "visual_command": false,
    "result": {
      "status": 0,
      "result": null
    },
    "suggestion": null,
    "between_commands": 0.05379486083984375,
    "duration": 0.4807109832763672,
    "path": "execute/async",
    "hide_from_ui": false,
    "method": "POST",
    "statusCode": 0
  },
  {
    "in_video_timeline": 85.75,
    "screenshot": null,
    "suggestion_values": [],
    "start_time": 1728916865.435227,
    "request_id": "f7e79f8e-782a-4681-8806-798b3a7717a3",
    "request": {
      "script_checksum": "2ee6d4800ed585b512260276784abde0a1ac2a3605ceaada5edd22628381de9e",
      "args": [
        {
          "forceSelect": true,
          "selector": {
            "id": "application-serialnumber-analyze-component---detailFullscreenView--tableNavigationUpStreamMenuItem-unifiedmenu",
            "searchOpenDialogs": true
          },
          "wdio_ui5_key": "applicationserialnumber-analyze-component---detailFullscreenView--tableNavigationUpStreamMenuItem-unifiedmenu"
        }
      ],
      "script": "return ((controlSelector, done) => {\n        const waitForUI5Options = Object.assign({}, window.wdi5.waitForUI5Optio...TRUNCATED"
    },
    "HTTPStatus": 200,
    "visual_command": false,
    "result": {
      "status": 1,
      "message": "Error: No DOM element found using the control selector {\"id\":\"application-serialnumber-analyze-component---detailFullscreenView--tableNavigationUpStreamMenuItem-unifiedmenu\",\"searchOpenDialogs\":true}"
    },
    "suggestion": null,
    "between_commands": 0.03680300712585449,
    "duration": 1.2431211471557617,
    "path": "execute/async",
    "hide_from_ui": false,
    "method": "POST",
    "statusCode": 0
  },
...

Screenshots
Test Recorder shows this:
Image
Image

Runtime Env (please complete the following information):

  • wdi5/wdio-ui5-service-version: 2.0.10
  • UI5 version: 1.120.19
  • wdio-version (output of wdio --version): 8.40.6
  • node-version (output of node --version): 20.17.0
  • OS: [e.g. Linux openSuSE]: Linux (not sure which version exactly, but reproducible on saucelabs with platformName: 'Linux')
  • Browser + Version [e.g. chrome 97.0.4692.71]: firefox 131 + firefox 125.0.3

Additional context
We face this issue already since end of last year with WDI5 1.5, now after upgrade to verison 2 the issue still occurs. If you think it is not related to WDI5, i hope you can give us some guidance how to proceed. UI5 asked for an example to debug, but as mentioned, when manually clicking on the menuButton it is working.

@Siolto
Copy link
Collaborator

Siolto commented Oct 15, 2024

Hi @sebage,

first of all thanks for such a detailed bug report! I will try to reproduce it (will take a little bit of time as I don't have a Linux machine right next to me 😄).

Could you maybe try if the native wdio click is working?

const menuButton = await browser.asControl({
    forceSelect: true,
        selector: {
            id: "application-serialnumber-analyze-component---detailFullscreenView--tableNavigationMenuButton"
        }
})
const wdioMenuButton = await menuButton.getWebElement()
await wdioMenuButton.click()

If the wdio click is working probably something with interactWithControl is wrong

@sebage
Copy link
Author

sebage commented Oct 15, 2024

Hi @Siolto

i have created a sample, was just about to post it 😄 Will also try the native wdio click.

I have now been able to create following spec to reproduce the issue. It uses the sap.m.MenuButton sample app from UI5. Tested with latest UI5 version and 1.120.21, both showing the issue, that the test fails using Linux and Firefox. Interestingly this also fails when using Windows 11 and Firefox on saucelabs, but works on my local machine (Windows 11, Firefox 131).

describe("MenuButton Test", async () => {


    it("press MenuButton to see MenuItems", async () => {
        await browser.url("https://ui5.sap.com/1.120.21/resources/sap/ui/documentation/sdk/index.html?sap-ui-xx-sample-id=sap.m.sample.MenuButton&sap-ui-xx-sample-lib=sap.m&sap-ui-xx-sample-origin=.&sap-ui-xx-dk-origin=https%3A%2F%2Fui5.sap.com&sap-ui-theme=sap_horizon&sap-ui-rtl=false&sap-ui-density=sapUiSizeCozy");
        //await browser.url("https://ui5.sap.com/resources/sap/ui/documentation/sdk/index.html?sap-ui-xx-sample-id=sap.m.sample.MenuButton&sap-ui-xx-sample-lib=sap.m&sap-ui-xx-sample-origin=.&sap-ui-xx-dk-origin=https%3A%2F%2Fui5.sap.com&sap-ui-theme=sap_horizon&sap-ui-rtl=false&sap-ui-density=sapUiSizeCozy");
        const _ui5Service = require('wdio-ui5-service').default;
        const wdioUI5Service = new _ui5Service();
        await wdioUI5Service.injectUI5();

        const oMenuButtonSelector = {
                selector: {
                    controlType: "sap.m.Button",
                    viewName: "sap.m.sample.MenuButton.MB",
                    properties: {
                            text: "File"
                    },
                    ancestor: {
                            controlType: "sap.m.VBox",
                            viewName: "sap.m.sample.MenuButton.MB"
                    }
            }
        }
        await browser.asControl(oMenuButtonSelector).press();

        const oMenuItemSelector = {
                selector: {
                    controlType: "sap.ui.unified.MenuItem",
                    viewName: "sap.m.sample.MenuButton.MB",
                    properties: {
                            text: "Edit"
                    },
                    searchOpenDialogs: true,
                    interaction: {
                            idSuffix: "txt"
                    }
            }
        };
        await expect(await (await browser.asControl(oMenuItemSelector)).getWebElement()).toBeDisplayed()  
    });
})

@sebage
Copy link
Author

sebage commented Oct 15, 2024

Hi @Siolto
adapted the sample to use wdio click, still shows the same issue, attached the log output of the testrun: log.json

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants