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

TestShadowDOMAndDocumentFragment fails with cannot find context with specified ID #1324

Open
5 tasks
inancgumus opened this issue May 9, 2024 · 1 comment
Open
5 tasks
Labels
bug Something isn't working tests

Comments

@inancgumus
Copy link
Member

inancgumus commented May 9, 2024

What?

Fix the "cannot find context with specified ID" error in the flaky test (see this failure).

Commit: fa9d4de

Message:

--- FAIL: TestShadowDOMAndDocumentFragment (0.00s)
    --- FAIL: TestShadowDOMAndDocumentFragment/waitFor_DocumentFragment (7.32s)
        page_test.go:1715: 
            	Error Trace:	/home/runner/work/xk6-browser/xk6-browser/tests/page_test.go:1715
            	Error:      	Received unexpected error:
            	            	Uncaught (in promise) GoError: waiting for "//p[@id=\"inDocFrag\"]": getting new document handle: getting document element handle: Cannot find context with specified id
            	            		at github.com/grafana/xk6-browser/common.(*Locator).WaitFor-fm (native)
            	            		at <eval>:7:15(23)
            	Test:       	TestShadowDOMAndDocumentFragment/waitFor_DocumentFragment
        page_test.go:1718: 
            	Error Trace:	/home/runner/work/xk6-browser/xk6-browser/tests/page_test.go:1718
            	Error:      	Not equal: 
            	            	expected: "This text is added via a document fragment!"
            	            	actual  : "GoError: waiting for \"//p[@id=\\\"inDocFrag\\\"]\": getting new document handle: getting document element handle: Cannot find context with specified id"
            	            	
            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -1 +1 @@
            	            	-This text is added via a document fragment!
            	            	+GoError: waiting for "//p[@id=\"inDocFrag\"]": getting new document handle: getting document element handle: Cannot find context with specified id
            	Test:       	TestShadowDOMAndDocumentFragment/waitFor_DocumentFragment

Why?

To fix the flakiness. This might also indicate an underlying issue.

How?

No response

Tasks

Tasks

Preview Give feedback

Related PR(s)/Issue(s)

#1315 #1144

@inancgumus inancgumus added bug Something isn't working tests labels May 9, 2024
@mortenb-buypass
Copy link

I see the same error. Generally lots of problems with shadow doms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tests
Projects
None yet
Development

No branches or pull requests

2 participants