code: def test_cat_gui(driver, cat_series_box_hist_figure):
      from pytest_cov.embed import cleanup_on_sigterm
  
      cleanup_on_sigterm()
  
      port = 9034
      proc = multiprocessing.Process(
          target=cat_series_box_hist_figure.show_dash,
          kwargs=dict(mode="external", port=port),
      )
      proc.start()
      try:
          time.sleep(1)
          fr = FigureResamplerGUITests(driver, port=port)
          time.sleep(1)
          fr.go_to_page()
  
          # First, apply some horizontal based zooms
          fr.drag_and_zoom("xy", x0=0.1, x1=0.5, y0=0.5, y1=0.5)
          fr.clear_requests(sleep_time_s=1)
          fr.drag_and_zoom("xy", x0=0.1, x1=0.5, y0=0.5, y1=0.5)
          time.sleep(1)
          RequestParser.browser_independent_single_callback_request_assert(
              fr=fr,
              relayout_keys=["xaxis.range[0]", "xaxis.range[1]"],
              n_updated_traces=1,
          )
  
          # The right top subplot withholds a boxplot, which is NOT a high-freq trace
          # so no new data should be send from the server to the client -> 204 status code
          fr.clear_requests(sleep_time_s=1)
          fr.drag_and_zoom("x2y2", x0=0.3, x1=0.7, y0=0.2, y1=0.8)
          time.sleep(1)
          vertical_requests = RequestParser.filter_callback_requests(
              fr.get_requests()
          )
          assert len(vertical_requests) == 1
          assert vertical_requests[0].response.status_code == 204
  
          fr.clear_requests(sleep_time_s=1)
          fr.autoscale()
          time.sleep(1)
          autoscale_requests = RequestParser.filter_callback_requests(
              fr.get_requests()
          )
          assert len(autoscale_requests) == 1
          assert autoscale_requests[0].response.status_code == 204
  
          # Note: as there is only 1 hf-scatter-trace, the reset axes command will only
          # update a single trace
          fr.clear_requests(sleep_time_s=1)
          fr.reset_axes()
          time.sleep(1)
          RequestParser.browser_independent_single_callback_request_assert(
              fr=fr,
              relayout_keys=[
                  "xaxis.autorange",
                  "xaxis.showspikes",
                  "xaxis2.autorange",
                  "xaxis2.showspikes",
                  "xaxis3.autorange",
                  "xaxis3.showspikes",
                  "yaxis.autorange",
                  "yaxis.showspikes",
                  "yaxis2.autorange",
                  "yaxis2.showspikes",
                  "yaxis3.autorange",
                  "yaxis3.showspikes",
              ],
              n_updated_traces=1,
          )
  
          if (
              len(driver.get_log("browser")) > 0
          ):  # Check no errors in the browser
              for entry in driver.get_log("browser"):
                  print(entry)
                  if not entry["level"] == "INFO":
                      # Only WebGL warnings are allowed
                      assert entry["level"] == "warning"
                      assert entry["message"].contains("WebGL")
      except Exception as e:
          raise e
      finally:
          proc.terminate()
  
file_path: plotly-resampler/tests/test_figure_resampler_selenium.py
imports: import multiprocessing
  import time
  from plotly_resampler.figure_resampler import FigureResampler
  from .fr_selenium import FigureResamplerGUITests, RequestParser
label_desc: Use image node_id 5 for calling a global function with example usage: test_cat_gui(driver, cat_series_box_hist_figure) without return types