I’m trying to automate the retrieval of documents from the Seattle Municipal Court interface. In particular, I want to download the police reports. The reports appear in a standard format on a table as “Declaration - Police Report,” but there are often multiple pages of proceedings, and the police report is on the last page or second to last.
So far, I have configured it to Ctrl-F search for "police report, and I have an “If” activity setup so that whenever the result equals “1,” it’s set to identify the row that the file is on, click on it, and download the file. The Else branch is set to Click the “Next” button and repeat the Ctrl-F operation until it hits the police report.
Since I’m not sure how to repeat the Else branch until it succeeds (also could use help on that if someone knows), I have repeated the copy pasted the the If-Then-Else series inside the Else branch eight times to cover most scenarios.
When I tested it, everything worked to a point. It opened the page, searched for the police report, and clicked through all the pages until it found the police report, but it didn’t execute the “Then” branch (download the file) as expected.
It gives me the following error:
Activity Click ‘Next page’ (N Click) failed: The target element is disabled. Operation canceled.
I surmise that this is because it’s at the end of the results and the “Next” arrow is disabled, but I can’t understand why it didn’t trigger the “Then” branch to run.
It’s likely a problem further up the chain. I created a write line for the Get Text Activity immediately before where the Error occurred, and the output is “0/0” instead of “1/1” as is expected.I think my Get Text isn’t configured correctly. I was having a hard time setting anchors for it, but I assumed it was working because it was correctly outputting “0/0” earlier.
I feel like I’m so close to figuring this out, but I could use a little push to get in the right direction.