Link to home
Start Free TrialLog in
Avatar of Fordraiders
FordraidersFlag for United States of America

asked on

xpath for next set of records in navigation

xml: Using Webscraper called " Data Miner"

I'm trying to get syntax correct for xpath to automatically navigate to next page.

It is asking me for   "Next Page Element Xpath:"

trying to use this below but it is not working: keeps saying it cant find element

//a[@class='page_numbers']/following-sibling::a[1]


<div class="col-md-12 no-padding pagination-container">
	
		
			<div class="ref-pagination col-md-8 col-lg-9 no-padding pull-right">
				<ul class="pagination pull-right">
					<li class="first">
							
								<a href="javascript:void(0);" class="diabled-anchor"> <span>First</span>
								</a>
							
							
						</li>
					<li class="prev">
							
								<a href="javascript:void(0);" class="diabled-anchor"> <span><</span>
								</a>
							
							
						</li>

					
					
						<li class="page_numbers"><a
							href="NextRecordsReferenced.do?id=1"><strong>1</strong><span
								class="hidden">1</span></a></li>
						
					
						<li class="page_numbers"><a
							href="NextRecordsReferenced.do?id=2"><strong>2</strong><span
								class="hidden">2</span></a></li>
						
					
						<li class="page_numbers"><a
							href="NextRecordsReferenced.do?id=3"><strong>3</strong><span
								class="hidden">3</span></a></li>
						
					
						<li class="page_numbers"><a
							href="NextRecordsReferenced.do?id=4"><strong>4</strong><span
								class="hidden">4</span></a></li>
						
					
						<li class="page_numbers"><a
							href="NextRecordsReferenced.do?id=5"><strong>5</strong><span
								class="hidden">5</span></a></li>
						
					
					<li class="next">
							
								<a href="javascript:void(0);" class="diabled-anchor"> <span>></span>
								</a>
							
							
						</li>
					<li class="last">
							
								<a href="javascript:void(0);" class="diabled-anchor"> <span>Last</span>
								</a>
							
							
						</li>
				</ul>
			</div>
			<div class="col-md-4 col-lg-3 col-sm-12 no-padding pull-left">
				<span class="item_per_label">Items per Page:</span>
				<div class="dropdown display_item_grid pull-left">
					<button class="btn btn-default dropdown-toggle" type="button"
						id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true">
						16 <span class="caret"></span>
					</button>
					<ul class="dropdown-menu" role="menu"
						aria-labelledby="dropdownMenu1">
						<li role="presentation"><a role="menuitem" class="selected"
							tabindex="-1" href="javascript:void(0);">16</a></li>
						<li role="presentation"><a role="menuitem" tabindex="-1"
							href="javascript:void(0);">32</a></li>
						<li role="presentation"><a role="menuitem" tabindex="-1"
							href="javascript:void(0);">48</a></li>
					</ul>
				</div>
			</div>

Open in new window




Thanks
fordraiders
ASKER CERTIFIED SOLUTION
Avatar of mccarl
mccarl
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Fordraiders

ASKER

mccarl,
"But I am also unsure as to if this will even work once you have the right element selected. I'm sure it would work if the link were real links, with URL's to take you to the next page, but it appears that these are just managed javascript which knows how to load the next page. Anyway, I guess you just have to try it and see."

Thanks and yes, it's a managed javascript routine. i think that is my problem.
So  there is not way to get the xpath string to include the routine ?

NextRecordsReferenced.do

Thanks
fordraiders
mccarl, Based on the syntax you gave me

I tried this and it worked.

//li[@class='page_numbers']/a

I replaced 'next' with 'page_numbers'

that works..

now when the pagination needs to end in data miner, it goes back to the beginning and starts over.

But thats not your problem.

Thanks
fordraiders