I'm new to Selenium and am using Firefox as my browser.
On the webpage I'm trying to automate there is a tableCell that changes depending on the page selected. It starts out with "First" "1" "2" and "Last" with the following html and page 1 is visible and current.
<tr class="tableRow" xpath="1">
<td class="tableCell" colspan="4"> </td>
<td class="tableCell centerAlign" colspan="3">
<div id="First">
<span>< First</span>
</div>
<div id="Numbers" style="">
<span>1</span>
<a href="javascript:void(0);">2</a>
</div>
<div id="Last">
<a href="javascript:void(0);">Last ></a>
</div>
</td>
</tr>
After I fill in all 14 data rows I click "2" to go to the next page. When I do, the html stays the same except the following.
<div id="Numbers" style="">
<a href="javascript:void(0);">1</a>
<span>2</span>
<a href="javascript:void(0);">3</a>
</div>
After I fill in all of those 14 data rows I click "3" to go to the next page. When I do, the html stays the same except the following.
<div id="Numbers" xpath="1">
<a href="javascript:void(0);">2</a>
<span>3</span>
<a href="javascript:void(0);">4</a>
</div>
After I fill in all of those 14 data rows I click "4" to go to the next page. When I do, the html stays the same except the following.
<div id="Numbers">
<a href="javascript:void(0);">3</a>
<span>4</span>
<a href="javascript:void(0);">5</a>
</div>
I can fill in the first 14 rows and select page 2 afterword by using the following:
driver.FindElement(By.XPath("//div[@id='Numbers']/a[1]")).Click();
It goes to page 2 and lets me fill in all 14 rows but don't always show and update the "tableCell centerAlign" to "First" "1" "3" and "Last".
I can't figure out how to make it show the updated "tableCell centerAlign", and even if it does, and I can't figure out how to make it go from page 2 to page 3, then 4, and then 5 when those pages are filled in.
Can someone help me out?