add text() testing function (with constraint) for css tester