Request description : The Context Menu in the Browser should be configurable to improve the UX.
90% of the time I need exactly one assertion (“waitForValue”).
But I need to pick it from this very long list of assertions, where it is very hard to spot the one I am looking for.
If I could adjust the menu to my needs, I’d put the Items I need most on top, add a separator and then the ones I need less often, below that.
The browser API even allows Sub-Menus.
The Selenium IDE has these nice Sub-Menus. They would also be possible.
For the sake of simplicity this could be put in an extension script, that provides an object/array with the desired context menu.
Extrapolating from the FOSS Sources an extension script could somehow look like this.
const myMenu = [
{ id: "waitForText", title: "Expect Text" },
{ id: "waitForValue", title: "Expect Value" },
{ id: "waitForElementPresent", title: "Expect Exists" },
{ id: "waitForVisible", title: "Expect Visible" },
{ id: "_sep", type: "separator" },
{ id: "waitForElementNotPresent", title: "waitForElementNotPresent" },
{ id: "waitForTextPresent", title: "waitForTextPresent" },
{ id: "waitForTextNotPresent", title: "waitForTextNotPresent" },
{ id: "waitForNotValue", title: "waitForNotValue" },
{ id: "waitForNotVisible", title: "waitForNotVisible" },
];
const defaultProps = {
documentUrlPatterns: ["<all_urls>"],
contexts: ["all"],
};
// this is the new extension API
UI.setContextMenu(myMenu.map(item => ({...defaultProps, ...item})));
The implementation could look like this.
class UI {
static async setContextMenu(items) {
await browser.contextMenus.removeAll();
for (const item of menu) {
await browser.contextMenus.create(item);
}
}
}
Benefit for user :
Creating assertions would be way more faster.
Number of users impacted :
All users that create mostly the same assertions
There are already other topics regarding this, but none of them has a satisfactory solution.
This topic already includes an implementation approach.
If Katalon Recorder was still FOSS, I’d gladly file a PR.
- How to add a command to the right-click context menu - #2 by Elly_Tran
- How to add a command to the right mouse click
- [REQUEST] Add ability to add commands to the right-click context menu - #2 by Liam_B
Benefit for Katalon :
Customer satisfaction
Business impact if we don’t accept the request :
Customers might switch to another recorder.