Phpmyadmin search dropdown menu

I am trying to create a macro to perform a search on a web page in phpmyadmin. I have been trying to do this with javascript. However I can’t get javascript to modify one of the operators for one of the fields. The operator is by default “LIKE”, but for the operator to work it needs to be “=”. Perhaps I am barking up the wrong tree and there is a more reliable way of making a macro for this search. Anyway here is the latest javascript I have tried :

(() => {// Get all rows of the search tableconst rows = document.querySelectorAll('table.tablesorter tbody tr');
// We know custom_fields is on the 5th row (index 4)
const row = rows[4];
if (!row) {
    console.error("Row 5 not found.");
    return;
}

// In this row, phpMyAdmin puts the operator in the 3rd <td>
const operatorCell = row.querySelector('td:nth-child(3)');
if (!operatorCell) {
    console.error("Operator cell not found in row 5.");
    return;
}

// The operator is the <select> dropdown in that cell
const operatorSelect = operatorCell.querySelector('select');
if (!operatorSelect) {
    console.error("Operator <select> not found.");
    return;
}

// Set operator to "="
operatorSelect.value = "=";

// Trigger the change event for phpMyAdmin's JS
operatorSelect.dispatchEvent(new Event('change', { bubbles: true }));

console.log("Operator for custom_fields changed to =");

})();

Any help would be appreciated