updated bcaudan's feature to select by css and content