You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug: k6-browser/locator/type does not recognize Japanese characters in the "text" argument
Description
The type() method of k6-browser/locator fails to recognize Japanese characters passed in its first argument, "text".
As a result, the browser cannot interpret the input as valid Japanese text, causing validation check errors. This prevents full automation of browser interactions. Given the high frequency of Japanese web services, this issue is expected to impact many developers in Japan. We request a quick resolution to this problem!
Cause
When using k6/browser and passing Japanese text into the type(text, [options]) method, the first argument, "text," is converted into Unicode escape sequences.
For example:
Actual input text: 大谷翔平とイチロー
Displayed in k6 terminal logs: \u5927\u8c37\u7fd4\u5e73\u3068\u30a4\u30c1\u30ed\u30fc
This behavior was confirmed by logging the input value (console.log()) in the browser console and observing the logs in the k6 terminal.
Steps to Reproduce
Prepare a web page with an input form.
Use k6/browser/locator and its type() method to input Japanese text into an input field (<input> tag).
Ensure the input field is configured to accept only Japanese text through validation.
Expected Behavior
The Japanese text is entered into the input field.
The browser successfully receives the Japanese string.
The validation check passes.
The form's submit button becomes active.
Actual Behavior
The Japanese text is entered into the input field.
The browser fails to correctly interpret the Japanese string.
The validation check fails.
The form's submit button remains inactive (disabled).
Bug:
k6-browser/locator/type
does not recognize Japanese characters in the "text" argumentDescription
The
type()
method ofk6-browser/locator
fails to recognize Japanese characters passed in its first argument, "text".As a result, the browser cannot interpret the input as valid Japanese text, causing validation check errors. This prevents full automation of browser interactions. Given the high frequency of Japanese web services, this issue is expected to impact many developers in Japan. We request a quick resolution to this problem!
Cause
When using
k6/browser
and passing Japanese text into thetype(text, [options])
method, the first argument, "text," is converted into Unicode escape sequences.For example:
大谷翔平とイチロー
\u5927\u8c37\u7fd4\u5e73\u3068\u30a4\u30c1\u30ed\u30fc
This behavior was confirmed by logging the input value (
console.log()
) in the browser console and observing the logs in the k6 terminal.Steps to Reproduce
k6/browser/locator
and itstype()
method to input Japanese text into an input field (<input>
tag).Expected Behavior
Actual Behavior
Environment Information
k6 v0.55.0
(go1.23.3, darwin/arm64)132.0.6834.111
The text was updated successfully, but these errors were encountered: