code: def test_data_editor_add_row_via_toolbar(app: Page):
      """Test that a row can be added via the toolbar."""
      data_editor_element = app.get_by_test_id("stDataFrame").nth(1)
      data_editor_toolbar = data_editor_element.get_by_test_id(
          "stElementToolbar"
      )
      expect(data_editor_element).to_have_css("height", "248px")
  
      # Activate toolbar:
      data_editor_element.hover()
      # Check that it is visible
      expect(data_editor_toolbar).to_have_css("opacity", "1")
  
      # Click add row button:
      add_row_button = data_editor_toolbar.get_by_test_id(
          "stElementToolbarButton"
      ).nth(0)
      add_row_button.click()
  
      # The height should reflect that one row is added (248px+35px=283px):
      expect(data_editor_element).to_have_css("height", "283px")
  
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 5 for calling a global function with example usage: test_data_editor_add_row_via_toolbar(app) without return types