Issue with Submitting Category and Subcategory Values via Automation in Retool

I'm encountering an issue in Retool where selecting and submitting a category and its relevant subcategory works as expected manually, but the values are not sent through the API when I attempt to automate this process using Playwright in Python.

Steps to Reproduce:

  1. Open the Retool app and navigate to the NLP feedback section.
  2. Select a category from the first dropdown and a subcategory from the second dropdown.
  3. Submit the form.
  4. When done manually, the selected values are correctly sent to the API, but when automated, the API payload does not contain these values.

Code snippet here to show relevant sections of the automation process

page2.locator("//input[@id='multiselect1--0']").click()

... continued code with dropdown and submission logic


Expected Behavior: The selected category and subcategory should be visible in the API payload after submitting via automation.

Actual Behavior: The values appear in the UI but are missing from the API payload when submitted through automation.

Troubleshooting Done:

* Verified that manual submission sends the values correctly.
* Attempted various waits and event dispatches to simulate user interactions more accurately.
* Reviewed Retool documentation for any potential configuration options that may impact automation.

Additional Details: I'm using Playwright with Python for automation. Is there a specific way to simulate the dropdown selection that Retool requires for automated interactions?

Hello @Nutan_Vyavahare,

There is a known bug where .click() event does not work for Retool apps in Playwright. There is a workaround, where another user was able to replicate the click event on a button by switching from

await button.click();

to:
await button.focus(); await page.keyboard.press("Enter");

So you might need to await your .locator() call and potentially save that to a variable to them focus and then call await page.keyboard.press("Enter").

Hopefully that works, if not, here are some steps to test out in your Playwright script to see if you are able to get the values into the API payload.

// Ensure the page and selector are correctly loaded
const status = await page.locator('select#status-selector');
// Change the selector to match yours

// Select the option by its value or label
await status.selectOption({ label: 'AwaitingAnalyst' });
// or use { value: 'option_value' }

Make sure to adjust the selector (select#status-selector) to correctly target your select element. You can select by value, label, etc.