Refer to another page and then OnClick button.

Hello,
I need help with code. Here is the scenario I looking for. When I click on button on page A I need to to go to page B (Projekte) and automatically force click button (vis), which is on page B.
Here is my code on page A:

import wixLocation from 'wix-location'

export function button_click(event) {
wixLocation.to("/projekte")
.then(() => {
    $w("#vis").onClick();
})
}

I get error: #vis is not a valid selector.
I am absolutely beginner in coding, this code made with different parts.

Please help!