redhat-developer / redhat-developer/vscode-extension-tester

Retrieve iframe console logs

Open
#650 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
326
Forks
88
Avg merge
7h 27m
Merged PRs (30d)
71

Description

I'm using vscode-extension-tester to add some functional coverage to an extension that contains several webviews. Recently we have started to see some test failures in our CI pipeline that we aren't able to reproduce locally. It would be useful to be able to dump all the console logs produced by every iframe to a file to understand what's the root cause of the issue.

I've tried the following code snippet but it returns the extension host logs, which aren't very helpful when debugging issues in the iframes.

let logEntries = await driver.manage().logs().get(logging.Type.BROWSER);
let logOutput = '';
logEntries.forEach((entry) => {
    logOutput += `[${entry.level}] ${entry.timestamp} : ${entry.message}\n`;
});

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WebDriver logging call shown in the issue, driver.manage().logs().get(logging.Type.BROWSER), and trace how iframe or webview contexts are handled. Done means console logs from every iframe can be collected and written to a file without returning only extension-host logs; add or update coverage for that behavior if the relevant tests are found.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.