Skip to content

test: Port onerror tests to playwright #11543

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

Closed
wants to merge 1 commit into from

Conversation

AbhiPrasad
Copy link
Member

No description provided.

Comment on lines +1 to +5
function throwStringError() {
throw 'stringError';
}

throwStringError();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with this code is that it throws an error immediately when the subject script is evaluated by the browser. This results in the infamous Script Error which the SDK filters by default. If you enable debug logging you should see that the error gets dropped by the SDK.

I usually add a click listener to a button and click it in the test to work around this.

@AbhiPrasad AbhiPrasad closed this Apr 17, 2024
@AbhiPrasad AbhiPrasad deleted the abhi-port-onerror-tests branch April 17, 2024 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants