<div id="calview">
<div class="row top-space">
Slots Available. Click on preferable date to Book the Slot
</div>
<div class="table-responsive">
<table class="table cal_table table-bordered">
<tbody><tr align="center">
<td colspan="7">
<a href="/slotscov6/fetchprevmnth.do?prevdateval=1556652349166" style="text-decoration:none;"><span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
Prev</a> May 2019
<a href="/slotscov6/fetchnextmnth.do?nextdateval=1556652349166" style="text-decoration:none;">Next
<span class="glyphicon glyphicon-chevron-right " aria-hidden="true"></span></a></td>
</tr>
<tr align="center" class="cal_days">
<td>SUN</td>
<td>MON</td>
<td>TUE</td>
<td>WED</td>
<td>THU</td>
<td>FRI</td>
<td>SAT</td>
</tr>
<tr align="center">
<td style="color: white;"> </td>
<td style="color: white;"> </td>
<td style="color: white;"> </td>
<td class="cal_blue" style="color: #0080FF;">1 </td>
<td class="cal_red" style="color: red;">2 </td>
<td class="cal_blue" style="color: #0080FF;">3 </td>
<td class="cal_blue" style="color: #0080FF;">4 </td>
</tr>
<tr align="center">
<td class="cal_blue" style="color: #0080FF;">5 </td>
<td class="cal_blue" style="color: #0080FF;">6 </td>
<td class="cal_blue" style="color: #0080FF;">7 </td>
<td class="cal_blue" style="color: #0080FF;">8 </td>
<td class="cal_gray">9 </td>
<td class="cal_gray">10 </td>
<td class="cal_gray">11 </td>
</tr>
<tr align="center">
<td class="cal_gray">12 </td>
<td class="cal_gray">13 </td>
<td class="cal_gray">14 </td>
<td class="cal_gray">15 </td>
<td class="cal_gray">16 </td>
<td class="cal_gray">17 </td>
<td class="cal_gray">18 </td>
</tr>
<tr align="center">
<td class="cal_gray">19 </td>
<td class="cal_gray">20 </td>
<td class="cal_gray">21 </td>
<td class="cal_gray">22 </td>
<td class="cal_gray">23 </td>
<td class="cal_gray">24 </td>
<td class="cal_gray">25 </td>
</tr>
<tr align="center">
<td class="cal_gray">26 </td>
<td class="cal_gray">27 </td>
<td class="cal_gray">28 </td>
<td class="cal_gray">29 </td>
<td class="cal_gray">30 </td>
<td class="cal_gray">31 </td>
</tr>
</tbody></table>
</div>
</div>
How do I get the text “May 2019” in two separate text variables from this code?
Google Inspector / Developer Tool gave me the XPath as follows -->
xpath=//*[@id="calview"]/div[2]/table/tbody/tr[1]/td/text()
But this gives me error -->
[error]
Cannot read property 'toUpperCase' of undefined
Removing the text()
part from the xpath gives output as #nomatchfound
Please help.