In browsertest.Open(), capture console INFO logs.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
Matt Moyer 2021-06-30 10:53:48 -05:00
parent 6b801056b5
commit 1904f8ddc3
No known key found for this signature in database
GPG Key ID: EAE88AD172C5AE2D
1 changed files with 4 additions and 0 deletions

View File

@ -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{