This is continuation of this question asked earlier Earlier question
I am able to select the date but the problem arises in below scenarios when there is some dates like
JavaScript
x
6
1
<td class="day disabled old">28</td>
2
<td class="day active">15</td>
3
<td class="day new">19</td>
4
<td class="day ">28</td>
5
6
I tried using XPath not contains but I am getting more than 1 element identified.
below is my code
JavaScript
1
5
1
(//div[@class='datepicker-days'])[3]/table/tbody//td[not(contains(class,'disabled'))][text()='28']
2
3
<td class="day disabled ">28</td>
4
<td class="day ">28</td>
5
I want to select only the dates which are below
JavaScript
1
3
1
<td class="day active">15</td>
2
<td class="day ">16</td>
3
how to do that ?
Advertisement
Answer
Predicate [not(contains(class,'disabled'))]
is not working as you should use @class
not class
:
JavaScript
1
2
1
[not(contains(@class,'disabled'))]
2