Autopilot - Dynamic Selector

Hi all.

I'm trying to automate clicks so that we can run a snippet to automatically run through tickets.

During the clicks, I need to open a dropdown menu and select an item from that menu. You can see this in the downshift selector. Unfortunately, the digit between downshift and item is dynamic and never stays the same.

Would anyone be able to take a look at the snippet below and provide suggestion on how I could possibly fix this?

{click: selector=.EBa--ChannelSwitcher--button}{wait: delay=+2s}{click: selector=#downshift-0-item-0}{wait: delay=+2s}{click: selector=.garden-focus-visible}{wait: delay=+2s}{click: selector=#downshift-0-item-0}{wait: delay=+2s}{click: selector=#communication > div > div > div.pP8--EmailComposerTab--emailSubjectSection > div > div > div > div > div > div.DraftEditor-editorContainer > div > div > div}
{wait: delay=+2s}{key: backspace}

Hi Thomas,

You have a couple options:

  1. You can try using {key: downarrow} to navigate down the menu items one by one
  2. You can try jumping to a specific menu item by typing out the letters of it {key: O}{key: t} (for "Others...", for instance)
  3. You can use a different selector that doesn't have the dynamic variability of the id ("#") selector in this case. If you post the HTML for your dropdown, we can advise you on that.

Does that help?

Hi Scott.

As always, a second brain on the issue has found the easiest solution.

The simple downarrow command worked a treat. Thank you!

1 Like