I have created several macros with the Record function, but they are basic.
I have a handy 3rd party extension installed for Safari: SwitchBrowser.
Manually, with the mouse, in Safari select menu File > Share > SwitchBrowser, and whatever web page is open in Safari then opens in Chrome.
I am trying to automate this with KM (without using the Record function). Any idea of what commands I use within KM to activate those options in Safari?
"Getting" things is usually done with Tokens or (for numbery stuff) Functions -- have a look at the Token list for something that would help with step 1.
"Doing" things is usually done with Actions -- have a look at the Actions list to see what would do step 2.
It's then a case of putting the steps together -- a big hint on how to do that is that you can put tokens into text fields to use the token value rather than typing something in yourself. See the Tokens part of the manual for more.
Have a go yourself, but shout out if you get lost.
The above will get you the same result as your "emulate what I do in the UI" approach, but more efficiently. It's good to start with what you do manually, but you should think of the "what" rather than the "how" so you can make better, more robust, macros.
It's good to provide this info when asking for help, because it can sometimes make a significant difference in getting a problem solved. The following macro makes this simple:
It looks like you're using macOS Monterey or Ventura. (I'm still using Mojave, so I'm unable to test here.)
Apple decided to get cute with the share sheet and make it look like iOS, so KM's Select menu action doesn't work properly with it anymore.
Does the keyboard work with it?
I.e. can you type-select to get to items in the share sheet?
If so then type-select is your friend. If not then perhaps Click at Found Image
The simplest way of doing this is going to be to use the FrontBrowserURL token to acquire the URL of the frontmost browser (Safari or Google Chrome) and then send that off to the browser you want to open it in.
There is zero need to automate the share menu or Switch Browser for this use case. Like @ccstone said above, you can open Safari's current URL token in Chrome with a single KM action: