Problem with fastSetValue on Material UI Components
See original GitHub issueThe problem
Material UI is one of the most popular React Components library. And when i’m trying to use Selenide with fastSetValues (setting values via js) it’s not working correctly.
Details
When Selenide sets value via JS Material UI component ( Autocomplete ) do not call hooks like onInputChange and others.
Tell us about your environment
- Selenide Version: 5.8.0
- Yandex browser: 20.2.0.1145
- Browser Driver Version: 79
- Selenium Version: embedded in Selenide
- OS Version: mac OS
Code To Reproduce Issue [ Good To Have ]
To reproduce the bug you may run the test:
@Test
void check() {
Configuration.fastSetValue = true;
open("https://rusakovstas.github.io/material-autocomplete/");
$(byText("Вбейте что нибудь или скопируйте")).closest("div").$("input").setValue("123");
$(byText("Поймали логику!")).shouldBe(visible);
}
For now it’s failed. If you remove Configuration.fastSetValue = true; it works fine.
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
Problem rendering content of Material UI components in React
Text content of Material UI components is not rendered to final HTML. Render method of my component looks like:
Read more >Take 1 Advanced Tray Regular Body Wash Fast Set Value ...
Take 1 Advanced Tray Regular Body Wash Fast Set Value Pack of 24 Cartridges. Log In to View Pricing and Order. 3995-055. In...
Read more >Concept for Improvement of Afterload in an Ex Vivo Heart ...
The design of a component can be more or less suitable for sterilization and depends mainly on two things: geometry and material. Geometry-dependence...
Read more >Globals - Material-UI
Globals. The overrides key enables you to customize the appearance of all instances of a component type, while the props key enables you...
Read more >For even more dynamics: High Power supply module for drive ...
... drive component that works inconspicuously and reliably in the ... short recovery times with fast set value changes and load jumps.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So, since the fix https://github.com/selenide/selenide/issues/1074#issuecomment-593118940 broke tests, i think there is nothing to do. Issue may be closed.
But for now you could use custom commands via execute method) For my case i wrote a command like this:
And in tests it’s look like:
$("input").execute(setValueAttribute("some value"));