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
LVL 3
FordraidersAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mccarlIT Business Systems Analyst / Software DeveloperCommented:
//a[@class='page_numbers']/following-sibling::a[1]
keeps saying it cant find element

Which would be correct because there are no <a> elements that have a class of "page_numbers"

You would need something like this...

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


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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FordraidersAuthor Commented:
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
0
FordraidersAuthor Commented:
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
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
XML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.