docstr: Thumbnails: Simple get async dashboard screenshot as selenium user
docstr_tok: ["Thumbnails",":","Simple","get","async","dashboard","screenshot","as","selenium","user"]
code: def test_get_async_dashboard_screenshot_as_selenium(self):
      """
      Thumbnails: Simple get async dashboard screenshot as selenium user
      """
      self.login(username="alpha")
      with patch.dict(
          "superset.thumbnails.digest.current_app.config",
          {
              "THUMBNAIL_EXECUTE_AS": [ExecutorType.SELENIUM],
          },
      ), patch(
          "superset.thumbnails.digest._adjust_string_for_executor"
      ) as mock_adjust_string:
          mock_adjust_string.return_value = self.digest_return_value
          _, thumbnail_url = self._get_id_and_thumbnail_url(
              DASHBOARD_URL
          )
          assert self.digest_hash in thumbnail_url
          assert (
              mock_adjust_string.call_args[0][1]
              == ExecutorType.SELENIUM
          )
          assert mock_adjust_string.call_args[0][2] == "admin"
  
          rv = self.client.get(thumbnail_url)
          self.assertEqual(rv.status_code, 202)
  
imports: import json
  import urllib.request
  from io import BytesIO
  from unittest import skipUnless
  from unittest.mock import ANY, call, MagicMock, patch
  import pytest
  from flask_testing import LiveServerTestCase
  from sqlalchemy.sql import func
  from superset import db, is_feature_enabled, security_manager
  from superset.extensions import machine_auth_provider_factory
  from superset.models.dashboard import Dashboard
  from superset.models.slice import Slice
  from superset.tasks.types import ExecutorType
  from superset.utils.screenshots import ChartScreenshot, DashboardScreenshot
  from superset.utils.urls import get_url_path
  from superset.utils.webdriver import WebDriverSelenium
  from tests.integration_tests.conftest import with_feature_flags
  from tests.integration_tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices, load_birth_names_data
  from tests.integration_tests.test_app import app
  from .base_tests import SupersetTestCase
label_desc: Use image node_id 4 for calling the TestThumbnails obj's underlying member method code with example usage: obj.test_get_async_dashboard_screenshot_as_selenium() without return types