Skip to content

Commit b480971

Browse files
committed
Update the console.log to actually work
Before it was printing "[object] [object] did not match any elements", which isn't helpful at all. If we want to log something here then we should be able to easily identify the selector and the desired state.
1 parent 2e5aeff commit b480971

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/js/modules/k6/browser/common/js/injected_script.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,8 @@ class InjectedScript {
10191019
if (lastElement !== element) {
10201020
lastElement = element;
10211021
if (!element) {
1022-
console.log(` ${selector} did not match any elements`);
1022+
// assume that the element is not attached.
1023+
console.debug(`'${selector.selector}' did not match any elements with state '${state}'`);
10231024
} else {
10241025
if (elements.length > 1) {
10251026
if (strict) {

0 commit comments

Comments
 (0)