I was suggesting that maybe the JQuery selectors Amit was wanting to use might actually be supported by CSS 3.0 and could use the By.ccsSelector(). I believe there are some JQuery selectors which aren't CSS 3.0, e.g. ":text", and I don't know if they'll work. But if they will work with CSS 3.0 then you can use the By.ccsSelector() method.
I like the idea of using executeScript for this but I've never been able to make it work. For example, if I go to a site which uses JQuery and set the jQuerySelectorValue to say "$(':text#uniqueID');" then I get the error:
java.lang.ClassCastException: java.lang.String cannot be cast to org.openqa.selenium.WebElement
If I cast the result to (String) and print it, it prints "$(':text#uniqueID');". Shouldn't something like the following work:
String jquerySelector = "$(':text');";
WebElement textInput = (WebElement) ((JavascriptExecutor)driver).executeScript("return arguments[0];", jquerySelector);
Darrell