ui5-community / wdi5

official UI5 end-to-end test framework for UI5 web-apps. wdi5 = Webdriver.IO + UI5 Test API
https://ui5-community.github.io/wdi5/
Apache License 2.0
102 stars 43 forks source link

Right click or context menu #595

Closed mccmrunal closed 5 months ago

mccmrunal commented 7 months ago

I want to apply a filter on column header iApplyFilter: async (extractId) => { let selector = { controlType: "sap.ui.table.Column", descendant:{ controlType: "sap.m.Label", properties:{ text:"Extract ID" } } } // let filterHeader = await browser.asControl({ selector }).contextClick(); // Simulate right-click

        // setTimeout(()=>{},3000);

        // let selector = {
        //     controlType: "sap.ui.table.Column",
        //     descendant: {
        //         controlType: "sap.m.Label",
        //         properties: {
        //             text: "Extract ID"
        //         }
        //     }
        // };

        let filterHeader = await browser.asControl({ selector });
        filterHeader.getWebElement().click();

},
Im trying this , below is attached screenshot of the table

image

vobu commented 7 months ago

hi, well, that quite an unformatted thing you posted here. But if I guesstimate that correctly, you're asking about right-clicking on a UI5 control. A way to do this is

// get ourselves the wdio representation of the wdi5 control
const $control = await browser.asControl({selector}).getWebElement()
await $control.click({button: "right"})

See https://webdriver.io/docs/api/element/click hth, v.

github-actions[bot] commented 6 months ago

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

github-actions[bot] commented 5 months ago

closed 📴 because silencio 🤫 since an additional 14 days after staleness 📠