Closed vsblabs closed 6 months ago
Supporting screenshots:
Sample code used:
I.waitForElement('button[data-testid="ELEMENT_ID1"]', 5)
I.click('button[data-testid="ELEMENT_ID2"]')
Expectation: The previously configured test must not fail since this is a minor version upgrade.
Sorry for this regression.
@kobenguyent maybe you have any ideas on this? Probably this is not related to my changes. What could have affected this
We introduced the PW locator in this PR. https://github.com/codeceptjs/CodeceptJS/pull/4255.
Would be nice to provide us the more info/logs so that we could understand the big picture better.
@kobenguyent
Here is the log that I have seen, for your notice.
Test case name:
element (button[data-testid="create-connector-action"]) still not present on page after 5 sec
locator.waitFor: DOMException: Failed to execute 'querySelectorAll' on 'Document': '[object Object]' is not a valid selector.
at query (<anonymous>:3352:41)
at <anonymous>:3362:7
at SelectorEvaluatorImpl._cached (<anonymous>:3139:20)
at SelectorEvaluatorImpl._queryCSS (<anonymous>:3349:17)
at SelectorEvaluatorImpl._querySimple (<anonymous>:3229:19)
at <anonymous>:3177:29
at SelectorEvaluatorImpl._cached (<anonymous>:3139:20)
at SelectorEvaluatorImpl.query (<anonymous>:3170:19)
at Object.query (<anonymous>:3384:44)
at <anonymous>:3342:21
Call log:
- waiting for locator('[object Object]').first()
Error: element (button[data-testid="create-connector-action"]) still not present on page after 5 sec
locator.waitFor: DOMException: Failed to execute 'querySelectorAll' on 'Document': '[object Object]' is not a valid selector.
at query (<anonymous>:3352:41)
Thanks in advance.
@kobenguyent
Here is the log that I have seen, for your notice.
Test case name: element (button[data-testid="create-connector-action"]) still not present on page after 5 sec locator.waitFor: DOMException: Failed to execute 'querySelectorAll' on 'Document': '[object Object]' is not a valid selector. at query (<anonymous>:3352:41) at <anonymous>:3362:7 at SelectorEvaluatorImpl._cached (<anonymous>:3139:20) at SelectorEvaluatorImpl._queryCSS (<anonymous>:3349:17) at SelectorEvaluatorImpl._querySimple (<anonymous>:3229:19) at <anonymous>:3177:29 at SelectorEvaluatorImpl._cached (<anonymous>:3139:20) at SelectorEvaluatorImpl.query (<anonymous>:3170:19) at Object.query (<anonymous>:3384:44) at <anonymous>:3342:21 Call log: - waiting for locator('[object Object]').first() Error: element (button[data-testid="create-connector-action"]) still not present on page after 5 sec locator.waitFor: DOMException: Failed to execute 'querySelectorAll' on 'Document': '[object Object]' is not a valid selector. at query (<anonymous>:3352:41)
Thanks in advance.
thanks for the info! We addressed the issue.
@kobenguyent Facing the same issue again while upgrading the version. Seems the issue persists.
What are you trying to achieve?
With the latest release v3.6.0, I'm facing issue in fetching the element with
data-testid
Its working fine in the earlier version i.e v3.5.15.
Details