Make the Browser Context Menu Configureable

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.

Benefit for Katalon :

Customer satisfaction

Business impact if we don’t accept the request :

Customers might switch to another recorder.

1 Like

Hi there, and thanks for posting in the Katalon community! :hugs:

To help you faster, please review our guide on Katalon Recorder here: Katalon Recorder overview | Katalon Docs. Double-checking the steps and configurations might resolve the issue.

If the doc doesn’t help, feel free to provide more details, and a community member will assist you soon. Thanks for being a part of our community!

Best,
Albert Le

Hi, @albert.vu
yes I checked the docs, but did not find any information regarding this topic.

I tried my best to supply all the necessary information.

I’ll be glad to answer any specific questions about my request.

Hi @htho,

Welcome to our community. Thank you for your feature request. I will create the ticket for this request so that my team can investigate it. Update with you soon. :wink: Thank you

1 Like