how can i get the webelement to be click based on data-key in the class _3d5d
? to be more exact, if a user input the value 2002, it will have an error that tells the user "no such year, please enter again" and allow him to reenter the value. if the value keyed in matches the data-type, it will click the element.
html snippet from firebug
<div class="_5ay5">
<div class="_18fs">
<div id="PageScrubberPagelet_153681831442414"
data-referrer="PageScrubberPagelet_153681831442414">
<div class="_4vm5 _5ay5">
<ul id="u_0_62">
<li class="_3d5d">
<a id="u_0_5x" class="_3d5b" role="button" href="#"
data-key="recent">Recent</a>
</li>
<li class="_3d5d">
<a id="u_0_5y" class="_3d5b _-fk" role="button"
href="#" data-key="year_2015">2015</a>
</li>
<li class="_3d5d">
<a id="u_0_5z" class="_3d5b" role="button" href="#"
data-key="year_2014">2014</a>
</li>
<li class="_3d5d">
<a id="u_0_60" class="_3d5b" role="button" href="#"
data-key="year_2013">2013</a>
</li>
Aucun commentaire:
Enregistrer un commentaire