code: def test_cnfd002_injected_confirm(dash_dcc):
      app = Dash(__name__)
      app.layout = html.Div(
          [
              html.Button(id="button", children="Send confirm"),
              html.Div(id="confirm-container"),
              dcc.Location(id="dummy-location"),
          ]
      )
  
      @app.callback(
          Output("confirm-container", "children"),
          [Input("button", "n_clicks")],
      )
      def on_click(n_clicks):
          if n_clicks:
              return dcc.ConfirmDialog(
                  displayed=True,
                  id="confirm",
                  message="Please confirm.",
              )
  
      dash_dcc.start_server(app)
      dash_dcc.wait_for_element("#button").click()
  
      time.sleep(1)
      dash_dcc.driver.switch_to.alert.accept()
  
      assert dash_dcc.get_logs() == []
  
imports: from multiprocessing import Value
  from dash.testing import wait
  from dash import Dash, Input, Output, State, dcc, html, callback_context
  import pytest
  import time
label_desc: Use image node_id 2 for calling a global function with example usage: test_cnfd002_injected_confirm(dash_dcc) and returns: dcc