code: def test_open_search_via_toolbar(
      themed_app: Page, assert_snapshot: ImageCompareFunction
  ):
      """Test that clicking on search toolbar button triggers dataframe search."""
      dataframe_element = themed_app.get_by_test_id("stDataFrame").nth(
          0
      )
      dataframe_toolbar = dataframe_element.get_by_test_id(
          "stElementToolbar"
      )
      search_toolbar_button = dataframe_toolbar.get_by_test_id(
          "stElementToolbarButton"
      ).nth(1)
  
      # Activate toolbar:
      dataframe_element.hover()
      # Check that it is visible
      expect(dataframe_toolbar).to_have_css("opacity", "1")
  
      # Hover search icon:
      search_toolbar_button.hover()
      # Test if tooltip works:
      expect(
          themed_app.get_by_test_id("stTooltipContent")
      ).to_have_text("Search")
      # Take a screenshot to capture hover effect:
      assert_snapshot(
          dataframe_toolbar, name="st_dataframe-toolbar_hover_search"
      )
  
      # Click on search button:
      search_toolbar_button.click()
  
      # Check that it is visible
      assert_snapshot(
          dataframe_element,
          name="st_dataframe-trigger_search_via_toolbar",
      )
  
file_path: streamlit/e2e_playwright/st_dataframe_interactions_test.py
imports: import pytest
  from playwright.sync_api import Page, expect
  from e2e_playwright.conftest import ImageCompareFunction
label_desc: Use image node_id 8 for calling a global function with example usage: test_open_search_via_toolbar(themed_app, assert_snapshot) without return types