This skill provides tools and techniques for Magento Admin panel automation. Includes admin login, customer management, search term analysis, and other common admin scenarios. Suitable for tasks requiring complex operations on e-commerce admin backends.
This skill is based on Playwright MCP tools, providing automation capabilities for Magento Admin panel.
In admin panel automation, we distinguish two types of operations:
Use Cases:
Prerequisites:
Usage:
# Usage:
# python admin_login.py <admin_url> <username> <password> <username_ref> <password_ref> <signin_ref>
# Example:
python admin_login.py http://localhost:7780/admin admin admin1234 e15 e20 e23
Use Cases:
Usage:
# Usage:
# python create_customer.py <first_name> <last_name> <email> <group> <group_ref> <fname_ref> <lname_ref> <email_ref> <save_btn_ref>
# Example:
python create_customer.py "Isabella" "Romano" "[email protected]" "Premium Europe" e92 e112 e124 e136 e61
Below are the basic tool functions and their use cases. These are atomic operations for flexible combination.
Note: Code should be written without line breaks.
# Standard format (browser persists across calls)
python run_browser_ops.py -c "await browser.navigate('http://localhost:7780/admin')"
navigate(url: str)Use Cases:
Example:
python run_browser_ops.py -c "await browser.navigate('http://localhost:7780/admin')"
navigate_back()Use Cases:
Example:
python run_browser_ops.py -c "await browser.navigate_back()"
click(ref: str, element: Optional[str] = None)Use Cases (very broad):
Example:
# Click Customers menu
python run_browser_ops.py -c "await browser.click(ref='e17', element='Customers menu')"
# Click All Customers link
python run_browser_ops.py -c "await browser.click(ref='e182', element='All Customers link')"
type_text(ref: str, text: str, element: Optional[str] = None)Use Cases:
Example:
# Enter username
python run_browser_ops.py -c "await browser.type_text(ref='e15', text='admin', element='Username textbox')"
# Enter filter value
python run_browser_ops.py -c "await browser.type_text(ref='e109', text='tank', element='Search Query filter input')"
select_option(ref: str, element_desc: str, value: str)Use Cases:
Example:
# Select customer group
python run_browser_ops.py -c "await browser.select_option(ref='e92', element_desc='Group select', value='Premium Europe')"
# Select status filter
python run_browser_ops.py -c "await browser.select_option(ref='e124', element_desc='Status filter combobox', value='Subscribed')"
press_key(key: str)Use Cases:
Example:
python run_browser_ops.py -c "await browser.press_key('Enter')"
snapshot()Use Cases (very important):
Example:
python run_browser_ops.py -c "await browser.snapshot()"
Best Practices:
list_tabs()Use Cases:
tab_new(url: Optional[str] = None)Use Cases:
Example:
python run_browser_ops.py -c "await browser.tab_new(url='http://localhost:7780/admin/customer/index/')"
Use snapshot() in the following situations: