Home > Enterprise >  Selenium Select the exact date from Datepciker
Selenium Select the exact date from Datepciker

Time:03-14

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

<td >28</td>
<td >15</td>
<td >19</td>
<td >28</td>
  

I tried using XPath not contains but I am getting more than 1 element identified.

below is my code

(//div[@class='datepicker-days'])[3]/table/tbody//td[not(contains(class,'disabled'))][text()='28']

<td >28</td>
<td >28</td>

I want to select only the dates which are below

<td >15</td>
<td >16</td>

how to do that ?

CodePudding user response:

Predicate [not(contains(class,'disabled'))] is not working as you should use @class not class:

[not(contains(@class,'disabled'))]
  • Related