web scraping - XPATH help for web scraper -
i need create button in web scraping chrome extension grab data web page cant next page button work
<div class="on" onclick="javascript:djxtablepage("_djxid_followup_status_",1)"> > </div>
when click next button > code changed following
<div class="on" onclick="javascript:djxtablepage("_djxid_followup_status_",2)"> > </div>
div around buttons
<div class="dxpaging"> </div>
but have got go forward > , backwords selects active button @ start.. xpath works per image goes the 1st active button there 4 buttons.
//*[contains(concat( " ", @class, " " ), concat( " ", "on", " " ))]
to all buttons use xpath:
//*[@class='on'][@onclick]
to all buttons, if there may class on
added element, use xpath:
//*[contains(@class,'on')][@onclick]
to button 1:
//*[@class="on"][contains(@onclick, '1')]
to button 2:
//*[@class="on"][contains(@onclick, '2')]
above xpaths work on code:
<div> <div class="on" onclick="javascript:djxtablepage("_djxid_followup_status_",1)">button 1</div> <div class="on" onclick="javascript:djxtablepage("_djxid_followup_status_",2)">button 2</div> </div>
Comments
Post a Comment