code: def test_handles_option_selection_via_typing(app: Page):
      """Test that selection of an option via typing works correctly."""
      selectbox_input = (
          app.get_by_test_id("stSelectbox").nth(3).locator("input")
      )
  
      # Type an option:
      selectbox_input.type("e2e/scripts/st_warning.py")
      selectbox_input.press("Enter")
  
      # Check that selection worked:
      expect(app.get_by_test_id("stMarkdown").nth(3)).to_have_text(
          "value 4: e2e/scripts/st_warning.py", use_inner_text=True
      )
  
file_path: streamlit/e2e_playwright/st_selectbox_test.py
imports: from playwright.sync_api import Page, expect
  from e2e_playwright.conftest import ImageCompareFunction
label_desc: Use image node_id 4 for calling a global function with example usage: test_handles_option_selection_via_typing(app) without return types