-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[DatePicker] Provide ability to add css className to DatePicker Dialog for Selenium WebDriver Testing #5329
Comments
Any solution for this problem? |
Second this issue, running into this same problem right now. |
Also would like this feature. |
add a testId prop or something else navigating your project in selenium is extremely taxing |
Closing for #4787 |
This issue it closed? But, I tried passing |
@nitte93 The issue was closed because it won't land in v0.x. |
@oliviertassinari it's not there in the materialui@next's too. The recommended components for |
There is no solution as of yet. However there is a workaround to pass a css class name to popup/dialog container. Pass an img tag for rightArrowIcon props of datepicker with onload function to call its parent and inject css class.
|
anyone have solution for this? it's so bad if I can not add a container class |
@huykon This issue is very old. If you can reproduce the issue with v5, please open a new issue. |
Versions
Description
We have a large scale, in-house react application we would like to incorporate the DatePicker into. However, the
<DatePicker />
component does not provide a way to assign a className to the Picker's Dialog Component, nor it's Calendar Component. This means there is no reliable way to locate a specific<DatePicker />
's associated Calendar to automate our integration tests using Capybara & Selenium WebDriver.In the code below, there is a [data-reactroot] attribute assigned to the outermost div (where styling is applied by material-ui.) If we could assign a className to this element, perhaps along the lines of
<DatePicker containerClassName="" />
, that would provide a hook for the webdriver to find, so we could automate the UI events from there. Ideally, we'd like to be able to differentiate between the dialog component and the calendar component, since the Input component already receives the className assigned to<DatePicker />
.Possibilities:
Or, alternatively, make the id required for
<DatePicker />
and provide constructed id's on the dialog and calendar's container elements.Below is the output in the DOM of the rendered dialog and calendar components when you have clicked on a
<DatePicker />
component. I haven't expanded everything, just enough to illustrate the point.Images & references
The text was updated successfully, but these errors were encountered: