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(&quot;_djxid_followup_status_&quot;,1)">&nbsp;&nbsp;&gt;&nbsp;&nbsp;</div> 

when click next button > code changed following

<div class="on" onclick="javascript:djxtablepage(&quot;_djxid_followup_status_&quot;,2)">&nbsp;&nbsp;&gt;&nbsp;&nbsp;</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.

image

//*[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(&quot;_djxid_followup_status_&quot;,1)">button 1</div>     <div class="on" onclick="javascript:djxtablepage(&quot;_djxid_followup_status_&quot;,2)">button 2</div> </div> 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -