click method

33 views
Skip to first unread message

Tony Stark

unread,
Sep 19, 2016, 7:43:41 AM9/19/16
to CasperJS
Hi,
   I want to emu the calendar click for <span class='day-num'>22</span> on Sep,but there are lots of 22th with same class on other months,how could I perform it by css selector or xPath?
   Thanks.
B2B91726-E673-45E5-9D87-F55E641B613B.png

Ken

unread,
May 25, 2017, 7:13:33 PM5/25/17
to CasperJS
For XPath, if something happens many times for eg //*[@text="22"] can try using (//*[@text="22"])[n] where n denotes which occurrence you are trying to point it. Of course, this works only if what you want is always at the nth occurrence.
Reply all
Reply to author
Forward
0 new messages