    async def click_access_server(browser, username):
        """access to the server for users via the Access Server button"""
        access_btn_xpath = f'//a[contains(@href, "user/{username}")]/button[contains(@class, "btn-primary")]'
        access_btn = browser.locator(access_btn_xpath)
        await expect(access_btn).to_be_enabled()
        await access_btn.click()
        await browser.go_back()
access to the server for users via the Access Server button
jupyterhub/tests/browser/test_browser.py