To check the Dark Appearance Toggle is ON for XCUI TEST, can anyone please rectify me as in below code , the flow is not coming inside the if loop, i am using below code. Code is Below -
if !settings.switches["Dark Appearance"].isEnabled
{
settings.switches["Dark Appearance"].tap()
}