@Test
    public void testConnection() {
        // getWebDriver {
        RemoteWebDriver driver = new RemoteWebDriver(chrome.getSeleniumAddress(), new ChromeOptions());
        // }

        // Construct a URL that the browser container can access
        // getPage {
        Testcontainers.exposeHostPorts(localPort);
        driver.get("http://host.testcontainers.internal:" + localPort);
        // }

        String headingText = driver.findElement(By.cssSelector("h1")).getText().trim();

        assertThat(headingText)
            .as("The hardcoded success message was found on a page fetched from a local server")
            .isEqualTo("It worked");
    }
Test that a browser running in a container can access a web server hosted on the host machine (i.e. the one running
the tests)
modules/selenium/src/test/java/org/testcontainers/junit/LocalServerWebDriverContainerTest.java