How to Write Browser Tests on Custom Theme? I'm writing front end tests for a custom webform. These tests work fine when testing on the webform page of the form.
$this-&gt;drupalGet('/webform/custom_form'); 
$this-&gt;assertResponse(200);

However, testing the form using a custom theme and the page that the form is displayed on, does not work and the assertion fails returning a 404 response.
&lt;?php


namespace Drupal\Tests\test_module\Kernel;


use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\webform\Functional\Element\WebformElementBrowserTestBase;

class WebformValidationTest extends WebformElementBrowserTestBase {

  public static $modules = [
    'webform',
    'test_module',
  ];

  public static $testWebforms = ['custom_form'];

  protected $defaultTheme = 'custom_theme';

  /**
   * Test custom_form page from site with custom_theme theme install.
   *
   * @throws \Exception
   */
  public function testThemeFormPage() {
    $this-&gt;drupalGet('/page-that-displays-form');
    $this-&gt;assertResponse(200);
  }
}

I have also tried creating a submodule that imports the full config and installs all dependent modules from the site. This also did not work.
Is writing front end tests for specific nodes something that is possible with Drupal Browser Tests? If not, how does one write tests for webforms (validation, fields, display, etc)?
Thanks.
I Would recommend reading
https://www.previousnext.com.au/blog/introducing-drupal-testing-traits-drupal-extension-testing-existing-sites
in this article it explains using https://gitlab.com/weitzman/drupal-test-traits
in this way you can do...
use weitzman\DrupalTestTraits\ExistingSiteBase;

/**
 * Test webform on theme
 */
class WebformValidationTest extends ExistingSiteBase
{
    public function testThemeFormPage()
    {
        $this-&gt;drupalGet('/page-that-displays-form');
        // Assert stuff here.
    }
}