添加链接 注册    登录
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
另类的核桃  ·  全国党员教育电视片推荐目录五:文艺片_共产党员网·  1 年前    · 
开朗的楼梯  ·  造梦西游三哪个角色最好 - 抖音·  2 年前    · 
不敢表白的牛肉面  ·  苏珊•桑塔格访谈录:反对后现代主义及其他·  2 年前    · 
深情的馒头  ·  如何评价黄渤监制的电影《风平浪静》? - 知乎·  2 年前    · 
求醉的大白菜  ·  到2022年发布10款新车!现代要连续放大招 ...·  2 年前    · 
link管理  ›  waitForNavigation([options]) | Grafana k6 documentation
prometheus metrics grafana
https://grafana.com/docs/k6/latest/javascript-api/k6-browser/page/waitfornavigation/
有腹肌的大象
2 月前
Create free account Contact us

Products

LGTM+ Stack

Logs

powered by Grafana Loki

Grafana

for visualization

Traces

powered by Grafana Tempo

Metrics

powered by Grafana Mimir and Prometheus

Profiles

powered by Grafana Pyroscope

Key Capabilities

AI/ML insights

Identify anomalies and reduce toil

Contextual root cause analysis

Automated anomaly correlation

SLO management

Create SLOs and error budget alerts

Alerting

Trigger alerts from any data source

Plugins

Connect Grafana to data sources, apps, and more

Observability Solutions

Frontend Observability

Gain real user monitoring insights

Application Observability

Monitor application performance

Infrastructure observability

Ensure infrastructure health and performance

Testing

Performance & load testing

powered by Grafana k6

Synthetic Monitoring

powered by Grafana k6

IRM

Grafana IRM

Observability native incident response

Incident

Routine task automation for incidents

OnCall

Flexible on-call management

Deploy The Stack

Grafana Cloud

Fully managed

Grafana Enterprise

Self-managed

Open Source

Grafana Loki

Multi-tenant log aggregation system

Grafana

Query, visualize, and alert on data

Grafana Tempo

High-scale distributed tracing backend

Grafana Mimir

Scalable and performant metrics backend

Grafana Pyroscope

Scalable continuous profiling backend

Grafana Beyla

eBPF auto-instrumentation

Grafana Faro

Frontend application observability web SDK

Grafana Alloy

OpenTelemetry Collector distribution with Prometheus pipelines

Grafana k6

Load testing for engineering teams

Prometheus

Monitor Kubernetes and cloud native

OpenTelemetry

Instrument and collect telemetry data

Graphite

Scalable monitoring for time series data

All

Community resources

Dashboard templates

Try out and share prebuilt visualizations

Prometheus exporters

Get your metrics into Prometheus quickly

end-to-end solutions

Opinionated solutions that help you get there easier and faster

Kubernetes Monitoring

Get K8s health, performance, and cost monitoring from cluster to container

Application Observability

Monitor application performance

Frontend Observability

Gain real user monitoring insights

Incident Response & Management

Detect and respond to incidents with a simplified workflow

All monitoring and visualization solutions

monitor infrastructure

Out-of-the-box KPIs, dashboards, and alerts for observability

linux server logo
Linux
windows logo
Windows
docker logo
Docker
postgresql logo
Postgres
mysql logo
MySQL
aws logo
AWS
kafka logo
Kafka
jenkins logo
Jenkins
rabbitmq logo
RabbitMQ
mongodb logo
MongoDB
microsoft azure observability logo
Microsoft Azure
google cloud observability with grafana cloud logo
Google Cloud
All monitoring solutions

visualize any data

Instantly connect all your data sources to Grafana

mongodb logo
MongoDB
appdynamics logo
AppDynamics
oracle database logo
Oracle
gitlab logo
GitLab
jira logo
Jira
salesforce logo
Salesforce
splunk logo
Splunk
datadog logo
Datadog
new relic logo
New Relic
snowflake logo
Snowflake
All visualization solutions

Learn

Stay up to date

GrafanaCON 2025

Our annual OSS community conference

ObservabilityCON 2025 (7-9 Oct)

Our flagship observability event

New

Blog

News, releases, cool stories, and more

Observability survey report 2025

Industry insights on the state of observability

New

Benefits of Observability

New research, reports, and insights

New

Story of Grafana

10 years of Grafana

Events

Upcoming in-person and virtual events

Success stories

By use case, product, and industry

Technical learning

Documentation

All the docs

Webinars and videos

Demos, webinars, and feature tours

Tutorials

Step-by-step guides

Workshops

Free, in-person or online

Learning Journeys

Expert guidance for mastering our platform

Writers' Toolkit

Contribute to technical documentation provided by Grafana Labs

Plugin development

Visit the Grafana developer portal for tools and resources for extending Grafana with plugins.

new

Professional Services

Expert guidance and training

Join the community

Community

Join the Grafana community

new

Community forums

Ask the community for help

Community Slack

Real-time engagement

Grafana Champions

Contribute to the community

new

Community organizers

Host local meetups

new

Docs

Grafana

Grafana Mimir

Grafana Tempo

Grafana Loki

Grafana Pyroscope

Grafana Alloy

Grafana Beyla

Grafana Faro

Grafana k6

OpenTelemetry

Prometheus

Writers’ Toolkit

Grafana Cloud

Grafana Cloud k6

Cloud Provider Observability

Synthetic Monitoring

Grafana Kubernetes Monitoring

Grafana IRM

Grafana SLO

Grafana Alerting

Grafana Machine Learning

Grafana Fleet Management

Application Observability

Grafana Enterprise

Grafana Enterprise Logs

Grafana Enterprise Metrics

Grafana Enterprise Traces

Plugin catalog

Visit documentation

Get started

Get started with Grafana

Build your first dashboard

Get started with Grafana Cloud

Learning Journeys

What's new / Release notes

Grafana: 12.0
Grafana k6: 0.57
Grafana Loki: 3.5
Grafana Mimir: 2.16
Grafana Pyroscope: 1.13
Grafana Tempo: 2.8
Pricing

Help build the future of open source observability software Open positions

Check out the open source projects we support Downloads

Sign in

LGTM+ Stack

Grafana Cloud Logs

Logs

powered by Grafana Loki

Grafana

Grafana

for visualization

Grafana Cloud Traces

Traces

powered by Grafana Tempo

Grafana Cloud Metrics

Metrics

powered by Grafana Mimir and Prometheus

Grafana Cloud Profiles

Profiles

powered by Grafana Pyroscope

Key Capabilities

AI/ML

AI/ML insights

Identify anomalies and reduce toil

Grafana Cloud Asserts

Contextual root cause analysis

Automated anomaly correlation

Grafana SLO

SLO management

Create SLOs and error budget alerts

Grafana Alerting

Alerting

Trigger alerts from any data source

Plugins

Plugins

Connect Grafana to data sources, apps, and more

Observability Solutions

Frontend Observability

Frontend Observability

Gain real user monitoring insights

Application Observability

Application Observability

Monitor application performance

Infrastructure Observability

Infrastructure observability

Ensure infrastructure health and performance

Testing

Grafana Cloud k6

Performance & load testing

powered by Grafana k6

Synthetic Monitoring

Synthetic Monitoring

powered by Grafana k6

IRM

Grafana Cloud IRM

Grafana IRM

Observability native incident response

Incident

Incident

Routine task automation for incidents

OnCall

OnCall

Flexible on-call management

Deploy The Stack

Grafana Cloud

Grafana Cloud

Fully managed

Grafana

Grafana Enterprise

Self-managed

The actually useful free plan
  • Grafana, of course
  • 14 day retention
  • 10k series Prometheus metrics
  • 500 VUh k6 testing
  • 50 GB logs, traces, and profiles
  • 50k frontend sessions
  • 2,232 app o11y host hours
  • 2,232 k8s monitoring host hours
  • 37,944 k8s monitoring container hours
  • and more cool stuff
Create free account No credit card needed, ever.
Grafana Cloud Logs

Grafana Loki

Multi-tenant log aggregation system

Grafana

Grafana

Query, visualize, and alert on data

Grafana Cloud Traces

Grafana Tempo

High-scale distributed tracing backend

Grafana Cloud Metrics

Grafana Mimir

Scalable and performant metrics backend

Grafana Cloud Profiles

Grafana Pyroscope

Scalable continuous profiling backend

Grafana Beyla

eBPF auto-instrumentation

Grafana Faro

Grafana Faro

Frontend application observability web SDK

Grafana Alloy

Grafana Alloy

OpenTelemetry Collector distribution with Prometheus pipelines

Grafana Cloud k6

Grafana k6

Load testing for engineering teams

Prometheus

Prometheus

Monitor Kubernetes and cloud native

OpenTelemetry

OpenTelemetry

Instrument and collect telemetry data

Graphite

Graphite

Scalable monitoring for time series data

All

Community resources

Dashboard templates
Try out and share prebuilt visualizations
Prometheus exporters
Get your metrics into Prometheus quickly

end-to-end solutions

Opinionated solutions that help you get there easier and faster

Kubernetes Monitoring

Kubernetes Monitoring

Get K8s health, performance, and cost monitoring from cluster to container

Application Observability

Application Observability

Monitor application performance

Frontend Observability

Frontend Observability

Gain real user monitoring insights

Incident Response & Management

Incident Response & Management

Detect and respond to incidents with a simplified workflow

monitor infrastructure

Out-of-the-box KPIs, dashboards, and alerts for observability

linux server logo Linux
windows logo Windows
docker logo Docker
postgresql logo Postgres
mysql logo MySQL
aws logo Kafka
jenkins logo Jenkins
rabbitmq logo RabbitMQ
mongodb logo MongoDB
microsoft azure observability logo Microsoft Azure
google cloud observability with grafana cloud logo Google Cloud

visualize any data

Instantly connect all your data sources to Grafana

mongodb logo MongoDB
appdynamics logo AppDynamics
oracle database logo Oracle
gitlab logo GitLab
jira logo Salesforce
splunk logo Splunk
datadog logo Datadog
new relic logo New Relic
snowflake logo Snowflake
All monitoring and visualization solutions

Stay up to date

GrafanaCON 2025

Our annual OSS community conference

ObservabilityCON 2025 (7-9 Oct)

Our flagship observability event

New

Blog

News, releases, cool stories, and more

Observability survey report 2025

Industry insights on the state of observability

New

Benefits of Observability

New research, reports, and insights

New

Story of Grafana

10 years of Grafana

Events

Upcoming in-person and virtual events

Success stories

By use case, product, and industry

Technical learning

Documentation

All the docs

Webinars and videos

Demos, webinars, and feature tours

Tutorials

Step-by-step guides

Workshops

Free, in-person or online

Learning Journeys

Expert guidance for mastering our platform

Writers' Toolkit

Contribute to technical documentation provided by Grafana Labs

Plugin development

Visit the Grafana developer portal for tools and resources for extending Grafana with plugins.

new

Professional Services

Expert guidance and training

Join the community

Community

Join the Grafana community

new

Community forums

Ask the community for help

Community Slack

Real-time engagement

Grafana Champions

Contribute to the community

new

Community organizers

Host local meetups

new

Featured

Getting started with grafana LGTM stack

Getting started with managing your metrics, logs, and traces using Grafana

Learn how to unify, correlate, and visualize data with dashboards using Grafana.

Learn more →

Open source

Grafana

Grafana

Grafana Cloud Metrics

Grafana Mimir

Grafana Cloud Traces

Grafana Tempo

Grafana Cloud Logs

Grafana Loki

Grafana Cloud Profiles

Grafana Pyroscope

Grafana Alloy

Grafana Alloy

Grafana Beyla

Grafana Faro

Grafana Faro

Grafana Cloud k6

Grafana k6

OpenTelemetry

OpenTelemetry

Prometheus

Prometheus

Writers Toolkit

Writers’ Toolkit

Cloud

Grafana Cloud

Grafana Cloud

Grafana Cloud k6

Grafana Cloud k6

Grafana Cloud Provider

Cloud Provider Observability

Synthetic Monitoring

Synthetic Monitoring

Kubernetes monitoring

Grafana Kubernetes Monitoring

OnCall

Grafana IRM

Grafana SLO

Grafana SLO

Grafana Alerting

Grafana Alerting

AI/ML

Grafana Machine Learning

Grafana Alloy

Grafana Fleet Management

Application Observability

Application Observability

Enterprise

Grafana

Grafana Enterprise

Grafana Cloud Logs

Grafana Enterprise Logs

Grafana Cloud Metrics

Grafana Enterprise Metrics

Grafana Cloud Traces

Grafana Enterprise Traces

Plugins Community

Plugin catalog

Visit documentation

Get started

Get started with Grafana

Build your first dashboard

Get started with Grafana Cloud

Learning Journeys

What's new / Release notes

Grafana: 12.0
Grafana k6: 0.57
Grafana Loki: 3.5
Grafana Mimir: 2.16
Grafana Pyroscope: 1.13
Grafana Tempo: 2.8
Technical documentation Plugin catalog
Choose a product
Viewing: v1.0.x (latest) Find another version
  • Grafana k6
    • v0.57.0
    • v0.56.0
    • v0.55.0
    • v0.54.0
    • v0.53.0
    • v0.52.0
    • v0.51.0
    • v0.50.0
    • v0.49.0
    • v0.48.0
    • v0.47.0
      • Troubleshooting
    • Configure your code editor
      • Install k6 Operator
        • Run k6 scripts with TestRun CRD
        • Use k6 Operator with k6 extensions
        • Use the k6 Operator with Grafana Cloud k6
        • Common options
        • Schedule k6 tests
      • Troubleshooting
    • Fine-tune OS
    • Usage collection
    • Write your first test
    • Running k6
    • Results output
    • k6 resources
    • HTTP Requests
      • Built-in metrics
      • Create custom metrics
    • Checks
    • Thresholds
      • How to use options
      • Options reference
    • Test lifecycle
    • Modules
    • Tags and Groups
    • Cookies
      • HTTP/2
      • WebSockets
      • gRPC
        • Online Certificate Status Protocol (OCSP)
        • SSL/TLS client certificates
        • SSL/TLS version and ciphers
    • Environment variables
    • Execution context variables
        • Graceful stop
        • Arrival-rate VU allocation
        • Dropped iterations
        • Open and closed models
        • Shared iterations
        • Per VU iterations
        • Constant VUs
        • Ramping VUs
        • Constant arrival rate
        • Ramping arrival rate
        • Externally controlled
      • Advanced Examples
      • File
      • Mock
      • Create a test script using the CLI
      • Test builder
        • Using the browser recorder
        • Using the k6 DevTools recorder
        • Using the HAR converter
    • JavaScript and TypeScript mode
    • Running browser tests
    • Browser metrics
    • Browser options
    • Migrating browser scripts to k6 v0.52
      • Hybrid approach to performance
      • Page object model
      • Select elements
      • Simulate user input delay
      • Prevent too many time series error
      • Custom summary
      • Amazon CloudWatch
      • Apache Kafka
      • CSV
      • Datadog
      • Dynatrace
      • Elasticsearch
      • Grafana Cloud k6
      • Grafana Cloud Prometheus
      • InfluxDB
      • JSON
      • Netdata
      • New Relic
      • OpenTelemetry
      • Prometheus remote write
      • StatsD
      • TimescaleDB
    • Web dashboard
    • Grafana dashboards
      • Smoke testing
      • Average-load testing
      • Stress testing
      • Soak testing
      • Spike testing
      • Breakpoint testing
    • Automated performance testing
    • API load testing
    • Calculate concurrent users for load tests
    • Load testing websites
    • Performance testing gRPC services
    • Running distributed tests
    • Running large tests
    • Synthetic monitoring
    • Use Chai with k6
      • xk6-disruptor first steps
      • Requirements
      • Installation
      • Expose your application
      • How xk6-disruptor works
          • gRPC
          • HTTP
          • Pod Termination
          • Constructor
          • injectGrpcFaults()
          • injectHTTPFaults()
          • terminatePods()
          • Constructor
          • injectGrpcFaults
          • injectHTTPFaults
          • terminatePods()
        • Inject gRPC faults into Service
        • Inject HTTP faults into Pod
        • Interactive demo
      • open( filePath, [mode] )
      • check( val, sets, [tags] )
      • fail( [err] )
      • group( name, fn )
      • randomSeed( int )
      • sleep( t )
        • addCookies()
        • addInitScript()
        • clearCookies()
        • clearPermissions()
        • close()
        • Cookie
        • cookies([urls])
        • grantPermissions(permissions[, options])
        • newPage()
        • pages()
        • setDefaultNavigationTimeout(timeout)
        • setDefaultTimeout(timeout)
        • setGeolocation(geolocation)
        • setOffline(offline)
        • waitForEvent(event[, optionsOrPredicate])
      • ConsoleMessage
      • MetricMessage
        • $(selector)
        • $$(selector)
        • boundingBox()
        • check([options])
        • click([options])
        • contentFrame()
        • dblclick([options])
        • dispatchEvent(type, eventInit)
        • fill(value, [options])
        • focus()
        • getAttribute(name)
        • hover([options])
        • innerHTML()
        • innerText()
        • inputValue([options])
        • isChecked()
        • isDisabled()
        • isEditable()
        • isEnabled()
        • isHidden()
        • isVisible()
        • ownerFrame
        • press(key, [options])
        • screenshot([options])
        • scrollIntoViewIfNeeded([options])
        • selectOption(values, [options])
        • selectText(values, [options])
        • setChecked(checked[, options])
        • setInputFiles(file[, options])
        • tap(options)
        • textContent()
        • type(text, [options])
        • uncheck([options])
        • waitForElementState(state[, options])
        • waitForSelector(selector[, options])
        • $(selector)
        • $$(selector)
        • check(selector[, options])
        • childFrames()
        • click(selector[, options])
        • content()
        • dblclick(selector[, options])
        • dispatchEvent(selector, type, eventInit[, options])
        • evaluate(pageFunction[, arg])
        • evaluateHandle(pageFunction[, arg])
        • fill(selector, value[, options])
        • focus(selector[, options])
        • frameElement()
        • getAttribute(selector, name[, options])
        • goto(url[, options])
        • hover(selector[, options])
        • innerHTML(selector[, options])
        • innerText(selector[, options])
        • inputValue(selector[, options])
        • isChecked(selector[, options])
        • isDetached()
        • isDisabled(selector[, options])
        • isEditable(selector[, options])
        • isEnabled(selector[, options])
        • isHidden(selector[, options])
        • isVisible(selector[, options])
        • locator(selector)
        • name()
        • page()
        • parentFrame()
        • press(selector, key[, options])
        • selectOption(selector, values[, options])
        • setChecked(selector, checked[, options])
        • setContent(html[, options])
        • setInputFiles(selector, file[, options])
        • tap(selector[, options])
        • textContent(selector[, options])
        • title()
        • type(selector, text[, options])
        • uncheck(selector[, options])
        • url()
        • waitForFunction(pageFunction, arg[, options])
        • waitForLoadState(state[, options])
        • waitForNavigation([options])
        • waitForSelector(selector[, options])
        • waitForTimeout(timeout)
        • asElement()
        • dispose()
        • evaluate(pageFunction[, arg])
        • evaluateHandle(pageFunction[, arg])
        • getProperties()
        • jsonValue()
        • down(key)
        • insertText(text)
        • press(key[, options])
        • type(text[, options])
        • up(key)
        • check([options])
        • clear([options])
        • click([options])
        • dblclick([options])
        • dispatchEvent(type, eventInit, [options])
        • fill(value, [options])
        • focus([options])
        • getAttribute(name, [options])
        • hover([options])
        • innerHTML([options])
        • innerText([options])
        • inputValue([options])
        • isChecked([options])
        • isDisabled([options])
        • isEditable([options])
        • isEnabled([options])
        • isHidden()
        • isVisible()
        • press(key, [options])
        • selectOption(values, [options])
        • setChecked(checked[, options])
        • tap([options])
        • textContent([options])
        • type(text, [options])
        • uncheck([options])
        • waitFor([options])
        • click(x, y[, options])
        • dblclick(x, y[, options])
        • down([options])
        • move(x, y[, options])
        • up([options])
        • bringToFront()
        • check(selector[, options])
        • click(selector[, options])
        • close()
        • content()
        • context()
        • dblclick(selector[, options])
        • dispatchEvent(selector, type, eventInit[, options])
        • emulateMedia([options])
        • emulateVisionDeficiency(type)
        • evaluate(pageFunction[, arg])
        • evaluateHandle(pageFunction[, arg])
        • fill(selector, value[, options])
        • focus(selector[, options])
        • frames()
        • getAttribute(selector, name[, options])
        • goto(url[, options])
        • hover(selector[, options])
        • innerHTML(selector[, options])
        • innerText(selector[, options])
        • inputValue(selector[, options])
        • isChecked(selector[, options])
        • isClosed()
        • isDisabled(selector[, options])
        • isEditable(selector[, options])
        • isEnabled(selector[, options])
        • isHidden(selector[, options])
        • isVisible(selector[, options])
        • keyboard
        • locator(selector)
        • mainFrame()
        • mouse
        • on(event, handler)
        • opener()
        • page.$(selector)
        • page.$$(selector)
        • press(selector, key[, options])
        • reload([options])
        • screenshot([options])
        • selectOption(selector, values[, options])
        • setChecked(selector, checked[, options])
        • setContent(html[, options])
        • setDefaultNavigationTimeout(timeout)
        • setDefaultTimeout(timeout)
        • setExtraHTTPHeaders(headers)
        • setInputFiles(selector, file[, options])
        • setViewportSize(viewportSize)
        • tap(selector[, options])
        • textContent(selector[, options])
        • throttleCPU(cpuProfile)
        • throttleNetwork(networkProfile)
        • title()
        • touchscreen
        • type(selector, text[, options])
        • uncheck(selector[, options])
        • url()
        • viewportSize()
        • waitForFunction(pageFunction, arg[, options])
        • waitForLoadState(state[, options])
        • waitForNavigation([options])
        • waitForSelector(selector[, options])
        • waitForTimeout(timeout)
        • workers()
        • allHeaders()
        • frame()
        • headers()
        • headersArray()
        • headerValue(name)
        • isNavigationRequest()
        • method()
        • postData()
        • postDataBuffer()
        • resourceType()
        • response()
        • size()
        • timing()
        • url()
        • allHeaders()
        • body()
        • frame()
        • headers()
        • headersArray()
        • headerValue(name)
        • headerValues(name)
        • json()
        • ok()
        • request()
        • securityDetails()
        • serverAddr()
        • size()
        • status()
        • statusText()
        • text()
        • url()
        • tap()
        • url()
      • closeContext()
      • context()
      • isConnected()
      • newContext([options])
      • newPage([options])
      • version()
      • createHash( algorithm )
      • createHMAC( algorithm, secret )
      • hmac( algorithm, secret, data, outputEncoding )
      • md4( input, outputEncoding )
      • md5( input, outputEncoding )
      • randomBytes( int )
      • ripemd160( input, outputEncoding )
      • sha1( input, outputEncoding )
      • sha256( input, outputEncoding )
      • sha384( input, outputEncoding )
      • sha512( input, outputEncoding )
      • sha512_256( input, outputEncoding )
      • sha512_224( input, outputEncoding )
      • Hasher
      • SharedArray
      • b64decode( input, [encoding], [format] )
      • b64encode( input, [encoding] )
    • k6/execution
          • Client.decr(key)
          • Client.decrBy(key, decrement)
          • Client.del(keys)
          • Client.exists(keys)
          • Client.expire(key, seconds)
          • Client.get(key)
          • Client.getDel(key)
          • Client.getSet(key, value)
          • Client.hdel(key, fields)
          • Client.hget(key, field)
          • Client.hgetall(key)
          • Client.hincrby(key, field, increment)
          • Client.hkeys(key)
          • Client.hlen(key)
          • Client.hset(key, field, value)
          • Client.hsetnx(key, field, value)
          • Client.hvals(key)
          • Client.incr(key)
          • Client.incrBy(key, increment)
          • Client.lindex(key)
          • Client.llen(key)
          • Client.lpop(key)
          • Client.lpush(key, values)
          • Client.lrange(key, start, stop)
          • Client.lrem(key, count, value)
          • Client.lset(key, index, element)
          • Client.mget(keys)
          • Client.persist(key)
          • Client.randomKey()
          • Client.rpop(key)
          • Client.rpush(key, values)
          • Client.sadd(key, members)
          • Client.sendCommand(command, args)
          • Client.set(key, value, expiration)
          • Client.sismember(key, member)
          • Client.smembers(key)
          • Client.spop(key)
          • Client.srandmember(key)
          • Client.srem(key, members)
          • Client.ttl(key)
        • Options
        • Blob
          • WebSocket.addEventListener(event, handler)
          • WebSocket.send(data)
          • WebSocket.close([code])
          • WebSocket.ping()
          • WebSocket.onclose
          • WebSocket.onerror
          • WebSocket.onmessage
          • WebSocket.onopen
          • WebSocket.onping
          • WebSocket.onpong
        • Params
          • getRandomValues
          • randomUUID
        • CryptoKey
          • decrypt
          • deriveBits
          • digest
          • encrypt
          • exportKey
          • generateKey
          • importKey
          • sign
          • verify
        • AesCbcParams
        • AesCtrParams
        • AesGcmParams
        • RsaOaepParams
        • AesKeyGenParams
        • CryptoKeyPair
        • EcKeyGenParams
        • EcdhKeyDeriveParams
        • EcdsaParams
        • RsaPssParams
        • HmacKeyGenParams
        • RsaHashedImportParams
        • RSAHashedKeyGenParams
        • JsonWebKey
        • parse( file, [options] )
        • Parser
        • Options
        • read
        • seek
        • stat
      • open
      • FileInfo
      • SeekMode
        • cancel(reason)
        • getReader()
        • CountQueuingStrategy
        • cancel(reason)
        • read()
        • releaseLock()
        • close()
        • enqueue(chunk)
        • error(reason)
    • parseHTML( src )
      • Element.selection()
      • Selection.attr(name)
      • Selection.children([selector])
      • Selection.closest(selector)
      • Selection.contents()
      • Selection.data([key])
      • Selection.each(fn)
      • Selection.eq(index)
      • Selection.filter(selector)
      • Selection.find(selector)
      • Selection.first()
      • Selection.get(index)
      • Selection.has(selector)
      • Selection.html()
      • Selection.is(selector)
      • Selection.last()
      • Selection.map(fn)
      • Selection.next([selector])
      • Selection.nextAll([selector])
      • Selection.nextUntil([selector], [filter])
      • Selection.not(selector)
      • Selection.parent([selector])
      • Selection.parents([selector])
      • Selection.parentsUntil([selector], [filter])
      • Selection.prev([selector])
      • Selection.prevAll([selector])
      • Selection.prevUntil([selector], [filter])
      • Selection.serialize()
      • Selection.serializeArray()
      • Selection.serializeObject()
      • Selection.size()
      • Selection.slice(start [, end])
      • Selection.text()
      • Selection.toArray()
      • Selection.val()
    • asyncRequest( method, url, [body], [params] )
    • batch( requests )
    • del( url, [body], [params] )
    • file( data, [filename], [contentType] )
    • get( url, [params] )
    • head( url, [params] )
    • options( url, [body], [params] )
    • patch( url, [body], [params] )
    • post( url, [body], [params] )
    • put( url, [body], [params] )
    • request( method, url, [body], [params] )
    • setResponseCallback( callback )
    • url\`url\`
    • expectedStatuses( statuses )
      • CookieJar.clear(url)
      • CookieJar.cookiesForURL(url)
      • CookieJar.delete(url, name)
      • CookieJar.set(url, name, value, [options])
    • FileData
    • Params
      • Response.clickLink( [params] )
      • Response.html()
      • Response.json( [selector] )
      • Response.submitForm( [params] )
      • Counter.add(value, [tags])
      • Gauge.add(value, [tags])
      • Rate.add(value, [tags])
      • Trend.add(value, [tags])
      • Client.load(importPaths, ...protoFiles)
      • Client.loadProtoset(protosetPath)
      • Client.connect(address [,params])
      • Client.asyncInvoke(url, request [,params])
      • Client.invoke(url, request [,params])
      • Client.close()
    • Params
    • Response
      • Stream.on()
      • Error
      • Stream.end()
      • Stream.write()
      • Event Handler
      • Metadata
    • Constants
  • k6/secrets
  • k6/timers
    • connect( url, params, callback )
    • Params
      • Socket.close([code])
      • Socket.on(event, callback)
      • Socket.ping()
      • Socket.send(data)
      • Socket.sendBinary(data)
      • Socket.setInterval(callback, interval)
      • Socket.setTimeout(callback, delay)
  • Error Codes
    • getRandomValues
    • CryptoKey
    • randomUUID
      • decrypt
      • deriveBits
      • digest
      • encrypt
      • exportKey
      • generateKey
      • importKey
      • sign
      • verify
    • AesCbcParams
    • AesCtrParams
    • AesGcmParams
    • RsaOaepParams
    • AesKeyGenParams
    • CryptoKeyPair
    • EcKeyGenParams
    • EcdhKeyDeriveParams
    • EcdsaParams
    • RsaPssParams
    • HmacKeyGenParams
    • RsaHashedImportParams
    • RSAHashedKeyGenParams
    • JsonWebKey
      • AWSConfig
        • putEvents
        • generateDataKey
        • listKeys
        • KMSDataKey
        • KMSKey
        • invoke
        • abortMultipartUpload
        • completeMultipartUpload
        • copyObject
        • createMultipartUpload
        • deleteObject
        • getObject
        • listBuckets
        • listObjects
        • putObject
        • uploadPart
        • Bucket
        • Object
        • S3MultipartUpload
        • S3Part
        • createSecret
        • deleteSecret
        • getSecret
        • listSecrets
        • putSecretValue
        • Secret
        • presign
        • sign
        • listQueues
        • sendMessage
        • sendMessageBatch
        • getParameter
        • SystemsManagerParameter
      • asyncRequest(method, url, [body], [params])
      • request(method, url, [body], [params])
      • get(url, [body], [params])
      • post(url, [body], [params])
      • put(url, [body], [params])
      • patch(url, [body], [params])
      • delete(url, [body], [params])
      • options(url, [body], [params])
      • head(url, [body], [params])
      • trace(url, [body], [params])
      • batch( requests )
      • setBaseUrl( url )
      • addHeader( key, value )
      • addHeaders( object )
      • clearHeader( name )
      • addTag( key, value )
      • addTags( object )
      • clearTag( name )
      • config
      • describe( name, function )
      • expect()
      • Error handling
      • instrumentHTTP
      • Client
      • instrumentHTTP
      • Client
      • Options
      • randomIntBetween(min, max)
      • randomItem(array)
      • randomString(length, [charset])
      • uuidv4()
      • findBetween(content, left, right, [repeat])
      • normalDistributionStages(maxVus, durationSeconds, [numberOfStages])
      • check( val, sets, [tags] )
    • resolve( path )
    • Explore extensions
    • Build a k6 binary using Go
    • Build a k6 binary using Docker
      • Quick start guide
      • Create an extension with a template
      • JavaScript Extensions
      • Output Extensions
      • Secret source Extensions
    • Run extensions using Binary Provisioning
      • About the Extensions Registry
      • About the Go-to-JS bridge
      • Extension Graduation
      • Test for functional behavior
      • Test for performance
      • Analyze results
      • Reuse and re-run tests
    • Single request
    • HTTP Authentication
    • OAuth Authentication
    • Correlation and Dynamic Data
    • Data Parameterization
    • Parse HTML
    • HTML Forms
    • Cookies Example
    • Data Uploads
    • API CRUD Operations
    • Generating UUIDs
    • HTTP2
    • WebSockets
    • SOAP
    • Transport Layer Security (TLS)
    • Generating realistic data
    • Bundling and transpiling
    • Functional testing
    • Track transmitted data per URL
    • URLs with query parameters
    • Instant load increase
    • Get timings for an HTTP metric
    • Distribute workloads across VUs
    • Error handler
    • Tutorials
  • Open source

    waitForNavigation([options])

    Waits for the given navigation lifecycle event to occur and returns the main resource response.

    Parameter Type Default Description
    options object null
    options.timeout number 30000 Maximum time in milliseconds. Pass 0 to disable the timeout. Default is overridden by the setDefaultTimeout option on BrowserContext or Page .
    options.waitUntil string load When to consider operation to have succeeded. See Events for more details.

    Events

    Caution

    networkidle is DISCOURAGED. Don’t use this method for testing especially with chatty websites where the event may never fire, rely on web assertions to assess readiness instead.

    Events can be either:

    • 'domcontentloaded' - consider operation to be finished when the DOMContentLoaded event is fired.
    • 'load' - consider operation to be finished when the load event is fired.
    • 'networkidle' - Consider operation to be finished when there are no network connections for at least 500 ms.

    Returns

    Type Description
    Promise<null | Response > The Response instance associated with the page. Else, it returns null

    Example

    JavaScript Copy
    import { browser } from 'k6/browser';
    import { check } from 'https://jslib.k6.io/k6-utils/1.5.0/index.js';
    export const options = {
      scenarios: {
        browser: {
          executor: 'shared-iterations',
          options: {
            browser: {
              type: 'chromium',
    export default async function () {
      const page = await browser.newPage();
      try {
        await page.goto('https://test.k6.io/my_messages.php');
        await page.locator('input[name="login"]').type('admin');
        await page.locator('input[name="password"]').type('123');
        const submitButton = page.locator('input[type="submit"]');
        await Promise.all([
          submitButton.click(),
          page.waitForNavigation(),
        await check(page.locator('h2'), {
          header: async h2 => await h2.textContent() == 'Welcome, admin!'
      } finally {
        await page.close();
    }

    Was this page helpful?

    Suggest an edit in GitHub
    Create a GitHub issue
    Email [email protected]
    Help and support
    Community

    Related resources from Grafana Labs

    Additional helpful documentation, links, and articles:
    video icon
    60 min
    Performance testing and observability in Grafana Cloud
    Performance testing and observability in Grafana Cloud
    Optimize user experiences with Grafana Cloud. Learn real-time insights, performance testing with k6, and continuous validation with Synthetic Monitoring.
    video icon
    60 min
    User-centered observability: load testing, real user monitoring, and synthetics
    User-centered observability: load testing, real user monitoring, and synthetics
    Learn how to use load testing, synthetic monitoring, and real user monitoring (RUM) to understand end users' experience of your apps. Watch on demand.

    Is this page helpful?

    On this page
    • Events
    • Returns
    • Example
    Scroll for more
    Sign up for Grafana stack updates
    Note: By signing up, you agree to be emailed related product-level information.

     
    推荐文章
    另类的核桃  ·  全国党员教育电视片推荐目录五:文艺片_共产党员网
    1 年前
    开朗的楼梯  ·  造梦西游三哪个角色最好 - 抖音
    2 年前
    不敢表白的牛肉面  ·  苏珊•桑塔格访谈录:反对后现代主义及其他
    2 年前
    深情的馒头  ·  如何评价黄渤监制的电影《风平浪静》? - 知乎
    2 年前
    求醉的大白菜  ·  到2022年发布10款新车!现代要连续放大招了_搜狐汽车_搜狐网
    2 年前
    Link管理   ·   Sov5搜索   ·   小百科
    link管理 - 链接快照平台