From 1904f8ddc3fc885bad57cfbc4f5d25612be2c49e Mon Sep 17 00:00:00 2001 From: Matt Moyer Date: Wed, 30 Jun 2021 10:53:48 -0500 Subject: [PATCH] In browsertest.Open(), capture console INFO logs. Signed-off-by: Matt Moyer --- test/testlib/browsertest/browsertest.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/testlib/browsertest/browsertest.go b/test/testlib/browsertest/browsertest.go index 9bfe2900..f2dc0702 100644 --- a/test/testlib/browsertest/browsertest.go +++ b/test/testlib/browsertest/browsertest.go @@ -27,6 +27,10 @@ func Open(t *testing.T) *agouti.Page { t.Logf("opening browser driver") env := testlib.IntegrationEnv(t) caps := agouti.NewCapabilities() + + // Capture console.log(), not just console.error(). + caps["loggingPrefs"] = map[string]string{"browser": "INFO"} + if env.Proxy != "" { t.Logf("configuring Chrome to use proxy %q", env.Proxy) caps = caps.Proxy(agouti.ProxyConfig{