-1

I'm having troubles with some elements that have the same class name but different attributes inside of them:

<td class=" " data-handler="selectDay" data-event="click" data-month="10" data-year="2017">
     <a class="ui-state-default" href="#">2</a></td>

<td class=" " data-handler="selectDay" data-event="click" data-month="11" data-year="2017">
     <a class="ui-state-default" href="#">2</a></td>

Want to choose the second element that has data-month="11" in it .

Thanks in advance.

user964503
  • 91
  • 1
  • 13

1 Answers1

0

Use below xpath :

//td[@data-month='11']/a

Change version of CSSSelector is

td[data-month='11']>a
NarendraR
  • 7,577
  • 10
  • 44
  • 82