i can give you a approach if you have not already done it like this.
Its simpler and you can avoid all the checks.
TransactionNumber =1
So in the GetTransactionData:
- Element exist current page 1
"<webctrl aaname='"+in_TransactionNumber.ToString+"' class='page-numbers current' tag='SPAN'/>"
- Scrape the current page
- For each row add the items Wi4 to the queue
- Element exists TransactionNumber+1
"<webctrl aaname='"+(in_TransactionNumber+1).ToString+"' class='page-numbers' tag='A'/>"
- If true assign out_TransactionIte = in_TransactionNumber+1
In Process
- Click on the next page
"<webctrl aaname='"+(in_TransactionItem+1).ToString+"' tag='A' class='page-numbers'/>"