Facing issue with automating using selenium - unable to close modal dialog

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

Describe the issue: I am trying do do selenium automation to access the logs of a dashboard and send email. My selenium java code is unable to close the below dialog box. Is there any way to handle this?

Configuration:

Relevant Logs or Screenshots:

@Devipriya Have you tried setting default_tenant in config.yml?

config:
  dynamic:
    kibana:
      default_tenant: global tenant

Hi @pablo , from where do I do that?

@Devipriya This is a config.yml file of OpenSearch security plugin.
The file is located in /usr/share/opensearch/config/opensearch-security folder.
To updated existing configuration you must use securitydamin.sh script.