i agree in theory but the available APIs actually require a lot of code to do that, since for each criteria that we want to match in one place we then need to traverse to another place to fish out a different attribute.  in jquery this is more tractable than via selenium.