Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ability to get console logs #434

Merged
merged 7 commits into from
Sep 26, 2024
Merged

Conversation

vtsvetkov-splunk
Copy link
Contributor

@vtsvetkov-splunk vtsvetkov-splunk commented Jul 19, 2024

ADDON-73881

As a smartx enjoyer, I want to get access to the browser console logs to fail my tests if there are JS errors.

Changes

  • Add capability to track logs in Chrome
  • Add a helper to access an array of logs

Example of usage

        severe_console_logs = get_browser_logs(ucc_smartx_selenium_helper.browser, log_level=LogLevel.SEVERE, log_source=LogSource.CONSOLE_API)
        assert not severe_console_logs, f"Unexpected severe console logs found: {severe_console_logs}"

Currently, this feature is only supported with the Chrome browser.
Analysis on adding support for other browser: https://splunk.atlassian.net/browse/ADDON-73881?focusedCommentId=15449369

@dvarasani-crest dvarasani-crest marked this pull request as ready for review September 13, 2024 12:31
@dvarasani-crest dvarasani-crest requested a review from a team as a code owner September 13, 2024 12:31
@dvarasani-crest dvarasani-crest merged commit df8b8b2 into main Sep 26, 2024
42 of 43 checks passed
@dvarasani-crest dvarasani-crest deleted the feature/log-grabbing branch September 26, 2024 06:20
@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2024
@srv-rr-github-token
Copy link
Contributor

🎉 This PR is included in version 5.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants