Question
1
Replies
46
Views
Posted: September 10, 2020
Last activity: September 15, 2020
How to style a UI Element based on Test ID or tour ID within HTML rule
Hi Team
i need to style a particular UI Checkbox tickmark background color which is in circumstanced section. Im not able to do that in CSS or skin format.
How can i style this element based on TEST ID of it , what is the code i should apply to change the background color of tickmar in checkbox???
Hi KiranC34
You can use [data-test-id="yourTestIdHere"] in UserWorkForm or another stylesheet in your application. Below is an example showing how to change the background color of a checkbox based only on the data-test-id attribute, in both checked and unchecked states. This is just a very simple example. You'll likely want to inspect the OOTB checkbox in devtools so that you can identify and utilize any of the styling/background you wish to keep.