Skip to content
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

Errors when using fill() on a textarea Locator #1225

Closed
2 tasks done
iandesj opened this issue Feb 21, 2024 · 2 comments · Fixed by #1238
Closed
2 tasks done

Errors when using fill() on a textarea Locator #1225

iandesj opened this issue Feb 21, 2024 · 2 comments · Fixed by #1238
Assignees
Labels
bug Something isn't working

Comments

@iandesj
Copy link

iandesj commented Feb 21, 2024

Brief summary

When I locate a textarea tag and try to fill it with Locator.fill(), I encounter an Uncaught (in promise) GoError. I have asserted that the element is visible with Locator.isVisible()

k6 version

k6 v0.49.0 (go1.21.6, darwin/amd64)

OS

macOS 11

Docker version and image (if applicable)

No response

Steps to reproduce the problem

  1. Locate the textarea in question with:
const textArea = page.locator('textarea[aria-label="Paste your own text here"]');
  1. Attempt to fill it with:
textArea.fill(aBigStringValue);
  1. Encounter error when running tests, like so:
ERRO[0008] Uncaught (in promise) GoError: filling "textarea[aria-label=\"Paste your text here\"]" with "In the heart of an ancient forest, where the trees whispered secrets...

Expected behaviour

I would expect the textarea to fill with the value I provided it, considering it is visible. I'll add that Locator.type() function works as expected with the same string value I'm passing to Locator.fill().

Actual behaviour

ERRO[0008] Uncaught (in promise) GoError: filling "textarea[aria-label=\"Paste your text here\"]" with "In the heart of an ancient forest, where the trees whispered secrets of a bygone era, there existed a village untouched by time. This village, known as Eldoria, was home to a peculiar person named Elian. Elian was unlike anyone else in Eldoria; he possessed an innate ability to communicate with the natural world around him. His days were spent wandering the forest, conversing with the wind, and learning the dialects of the streams.\nElian's unique gift was both a blessing and a burden. While he cherished his deep connection with nature, he often felt isolated from his fellow villagers. They respected his abilities but kept their distance, unsure of how to interact with someone who spent more time with trees than with people.\nOne day, as Elian was exploring the outer edges of the forest, he stumbled upon a clearing he had never seen before. In the center of this clearing stood a colossal oak tree, its branches reaching towards the sky as if in silent supplication. Elian approached the tree, sensing an ancient power emanating from its core.\nAs he placed his hand on the rough bark, a voice echoed in his mind, \"Elian, protector of the forest, you have been chosen.\" Startled, Elian looked around, but saw no one. The voice continued, \"A darkness looms over Eldoria, one that threatens the very essence of this land. You must journey to the Crystal Caverns and retrieve the Heartstone, the only object capable of dispelling this shadow.\"\n": needsinput
	at github.com/grafana/xk6-browser/common.(*Locator).Fill-fm (native)

Tasks

@iandesj iandesj added the bug Something isn't working label Feb 21, 2024
@oleiade oleiade removed their assignment Feb 28, 2024
@oleiade
Copy link
Member

oleiade commented Feb 28, 2024

Hey @iandesj 👋🏻

Thanks for reporting this issue. I think @ankur22 and @inancgumus will probably be better suited to look into it 👀

@inancgumus inancgumus transferred this issue from grafana/k6 Feb 28, 2024
@bandorko
Copy link
Contributor

bandorko commented Mar 7, 2024

I will fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants