How to test Number elements with UserInteraction? #5771
-
First Check
Example Codeimport pytest
from nicegui import ui
from nicegui.testing import User
@pytest.mark.nicegui_main_file(__file__)
async def test(user: User) -> None:
await user.open("/")
number_input = user.find(marker="number-element")
assert len(number_input.elements) == 1
assert isinstance(next(iter(number_input.elements)), ui.number)
number_input.type("42") # error :(
def root():
ui.number().mark("number-element")
if __name__ == "__main__":
ui.run(root)DescriptionI'm trying to test an HTML input element that is not implemented by the NiceGUI Version3.5.0 Python Version3.13.11 BrowserOther Operating SystemLinux Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Answered by
falkoschindler
Feb 13, 2026
Replies: 1 comment 1 reply
-
|
Thanks for bringing this up, @atollk! |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
atollk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for bringing this up, @atollk!
Simulated typing in
ui.numberelements is not supported yet. But I just created PR #5772 to add it in version 3.8. 🚀