Hello, I have a web automation problem.
I have a list of tickets like this. And I have an Excel file containing a list of the numbers of some of these tickets. So I would like to go through my datatable, and for each ticket number, do some operations on the ticket
tmpTicketNum is the ticket number, and it is always contained in the selector.
What frustrates me is that yesterday it worked very well, and today it doesn’t, even though I haven’t changed that part.
I have different behaviors when I run several times, sometimes it does not find the selector, or sometimes it clicks on another ticket, which is not the right one.
Am I doing wrong with dynamic selectors?
I also have another small question, but less important than the first. To go to the next page when there is no “next page” button, is there any other way than looking if the page number exists with the elementExists activity, and if it exists, click on it?
Yes, I always trim my variables, like this
tmpTicketNum = CurrentRow.Item(0).ToString.Trim
After some tests, it seems that the sendwindowmessages and simulateClick methods are the problem. When I leave them unchecked and use the normal method, it seems to work.
Thanks, I’ll continue with the second method I think, it seems to me the safest
Or I do a get Text on the page bar, I take the biggest number = the number of pages
Then a loop that goes through the pages with a dynamic selector to click on the page number of the current iteration.
But maybe it seems too complicated for that