Skip to content

test: Port onerror tests to playwright#11543

Closed
AbhiPrasad wants to merge 1 commit intodevelopfrom
abhi-port-onerror-tests
Closed

test: Port onerror tests to playwright#11543
AbhiPrasad wants to merge 1 commit intodevelopfrom
abhi-port-onerror-tests

Conversation

@AbhiPrasad
Copy link
Copy Markdown
Contributor

No description provided.

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

throwStringError();
Copy link
Copy Markdown
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