A woman is undergoing drug and alcohol testing after she drove onto tram tracks in Sydney's west before mounting the curb.