I have bunch of elements with X.

some elements have class Y also (ie both X and Y)

how do I select set of elements only have X?

below is my example HTML

<td class="dxeCalendarDay_Office2010Blue dxeCalendarOtherMonth_Office2010Blue" savedcursor="[object Object]" style="cursor: pointer;">29</td>

<td class="dxeCalendarDay_Office2010Blue" savedcursor="[object Object]" style="cursor: pointer;">4</td>

I could select all of them using

By.cssSelector("[class^='dxeCalendarDay']");

need something like..

 By.cssSelector("[class^='dxeCalendarDay'].Not:([class*='dxeCalendarOtherMonth'])");

what is the correct ?



Source link https://sqa.stackexchange.com/questions/34872/syntax-for---class--

LEAVE A REPLY

Please enter your comment!
Please enter your name here