Is there a way to find the inner text using CSS selector since the contains option no longer work with CSS3.
driver.findElement(By.cssSelector("button:contains('Add New Task')")).click(); - does not work. (work for Seleniun IDE)
Tried the following as per Unmesh Gundecha in the Selenium Testing Tools Cookbook - Locating elements using Text section
driver.findElement(By.cssSelector("button[textContent='Add New Task']")).click(); - does not work in IE 10 or Firefox 28
here is the snippet I am working from the button is called "Add New Task".
<button id="taskConfigForm:j_idt59" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-left" type="submit" onclick="PrimeFaces.ab({source:'taskConfigForm:j_idt59',update:'manageTaskConfigForm',oncomplete:function(xhr,status,args){PF('manageTaskConfigDialog').show();;}});return
false;" name="taskConfigForm:j_idt59" role="button" aria-disabled="false"><span class="ui-button-icon-left ui-icon ui-c ui-icon-plus"></span>
<span class="ui-button-text ui-c">Add New Task</span>
Thanks!