I am a newbie to css, html, etc and thus cssselectors. I have been messing around with selenium webdriver and am trying to .click() the following button:
<button title="" class="btn addWidgButt bt-block" href="" role="button" type="button" context="UNIQUE_THING">
<span class="btn-text">UNIQUE THING</span></button>
According to http://www.w3.org/TR/css3-selectors/#selectors shouldn't the following selector work? (Rule is E[foo="bar"] for element E
By.cssSelector("button title[context=UNIQUE_THING]")
By.cssSelector("btn.addWidgButt.bt-block[context=UNIQUE_THING]")
By.cssSelector("span[btn-text=UNIQUE THING]")
I think the last one is my best bet, as span is an element and btn-text is an attribute value. Any help is appreciated, thanks.