npm i taiko
export TAIKO_BROWSER_PATH="/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
npx taiko run.js --observe

run.js

const {openBrowser, goto, click, write, into, textBox} = require('taiko');



const assert = require('assert').strict;



(async () => {
try {
await openBrowser({
args: [
"--user-data-dir=/tmp/taiko/brave-music-float",
"--profile-directory=Default",
]
});
let title = `some song`;
let titleEncoded = encodeURIComponent(title);
await goto(`https://music.youtube.com/search?q=${titleEncoded}`);
} catch (error) {
console.error(error);
// await screenshot({path: 'error.png'})
} finally {
// closeBrowser();
}

})();

I also tried to get it working in my current open browser

args: [
"--user-data-dir=/Users/tjen/Library/Application Support/BraveSoftware/Brave-Browser",
"--profile-directory=Default",
]

but while it opens a tab in the expected place it also crashes immediately after

Error: The Browser instance was closed either via `closeBrowser()` call, or it exited for reasons unknown to Taiko. You can try launching a fresh instance using `openBrowser()` or inspect the logs for details of the possible crash.
at errorMessageForBrowserProcessCrash (/Users/tjen/dev/tjen/music-float/node_modules/taiko/lib/browserLauncher.js:300:11)
at ChildProcess.browserExitEventHandler (/Users/tjen/dev/tjen/music-float/node_modules/taiko/lib/browserLauncher.js:314:49)
at Object.onceWrapper (node:events:627:26)
at ChildProcess.emit (node:events:524:35)
at ChildProcess._handle.onexit (node:internal/child_process:293:12)