Skip to content

Update the console.log to be useful #4864

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

Merged
merged 1 commit into from
Jun 19, 2025
Merged

Conversation

ankur22
Copy link
Contributor

@ankur22 ankur22 commented Jun 18, 2025

What?

Updating the logging so that we can identify what is actually happening when an element is not found.

Why?

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. It should also identify itself as a debug log since it's not helpful for anything else.

Checklist

  • I have performed a self-review of my code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests for my changes.
  • I have run linter and tests locally (make check) and all pass.

Checklist: Documentation (only for k6 maintainers and if relevant)

Please do not merge this PR until the following items are filled out.

  • I have added the correct milestone and labels to the PR.
  • I have updated the release notes: 3fbeaa9
  • I have updated or added an issue to the k6-documentation: grafana/k6-docs#NUMBER if applicable
  • I have updated or added an issue to the TypeScript definitions: grafana/k6-DefinitelyTyped#NUMBER if applicable

Related PR(s)/Issue(s)

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.
@ankur22 ankur22 requested a review from a team as a code owner June 18, 2025 22:00
@ankur22 ankur22 requested review from inancgumus and codebien and removed request for a team June 18, 2025 22:00
@ankur22 ankur22 changed the title Update the console.log to actually work Update the console.log to be useful Jun 18, 2025
@codebien codebien added this to the v1.2.0 milestone Jun 19, 2025
@ankur22 ankur22 merged commit b480971 into master Jun 19, 2025
49 of 57 checks passed
@ankur22 ankur22 deleted the update/waitForSelector-debug-log branch June 19, 2025 15:20
@ankur22 ankur22 modified the milestones: v1.2.0, v1.1.0 Jun 19, 2025
ankur22 added a commit that referenced this pull request Jun 19, 2025
joanlopez added a commit that referenced this pull request Jun 25, 2025
* Base release notes for v1.1.0

* Add release notes for dependabot PRs

* Add #4809 and #4831 into the v1.1.0 release note

* Add #4845 to the v1.1.0 release notes

* Add example for locator.count

* Remove await on expect in count example

* Add section for nth, first and count in v1.1.0...

... release notes.

* Update examples to work with latest test library

This also updates the nth, first and last example.

* Add some PRs from the beginning of the cycle into release notes

* Add external PRs, among others, to release notes

* Clean up stuff from release notes template

* Add remaining PRs into release notes

* Add #4862 to the v1.1.0 release note

* Apply suggestions from code review

Co-authored-by: Mihail Stoykov <312246+mstoykov@users.noreply.github.com>

* Add #4864 to v1.1.0 release notes

* Remove #4862 from v1.1.0

* Apply suggestions from code review

Co-authored-by: İnanç Gümüş <inanc.gumus@grafana.com>

* web/crypto updates

* Update release notes/v1.1.0.md

Co-authored-by: Mihail Stoykov <312246+mstoykov@users.noreply.github.com>

* docs: document v1.1.0 forward roadmap

* Refine experimental modules notes

---------

Co-authored-by: ankur22 <ankur.agarwal@grafana.com>
Co-authored-by: Mihail Stoykov <312246+mstoykov@users.noreply.github.com>
Co-authored-by: İnanç Gümüş <inanc.gumus@grafana.com>
Co-authored-by: oleiade <theo@crevon.me>
Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com>
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.

3 participants