In the app, I am able to go to Settings and turn on the Dark Mode feature.
I want to check that this feature is working and write a test validating that the app went into Dark Mode successfully.
Asked
Active
Viewed 182 times
0

krisc
- 95
- 1
- 10
1 Answers
1
If you know the particular attribute (text or background color, etc) of an element that changes, you can use the Get Element Attribute command
MobileElement element = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID");
String tagName = element.getAttribute("content-desc");

K-man
- 353
- 1
- 13