code: def test_removes_query_params_when_swapping_pages(
      page: Page, app_port: int
  ):
      """Test that query params are removed when swapping pages"""
  
      page.goto(f"http://localhost:{app_port}/page_7?foo=bar")
      wait_for_app_loaded(page)
  
      page.get_by_test_id("stSidebarNav").locator("a").nth(2).click()
      wait_for_app_loaded(page)
  
      assert page.url == f"http://localhost:{app_port}/page3"
  
file_path: streamlit/e2e_playwright/multipage_apps/mpa_basics_test.py
imports: from playwright.sync_api import Page, expect
  from e2e_playwright.conftest import ImageCompareFunction, wait_for_app_loaded, wait_for_app_run
label_desc: Use image node_id 13 for calling a global function with example usage: test_removes_query_params_when_swapping_pages(page, app_port) without return types