[RPA] A story about resolving the issue where click locations change depending on the year and month
Introduction
Hello. This is Tsumugu.
This month is coming to an end, isn't it? I registered the payroll for the offices where the May payroll calculation was completed into OFS (Office Station, same below). Then, I stumbled while trying to check it, and this is the story of how I resolved that.
The downside of registering payroll due to fiscal year updates...
My workplace introduced OFS last year. I had been registering payroll data every month since entering 2026, but I hadn't registered the 2025 data. The other day, after the fiscal year update aggregation was finished, I completed the payroll registration in OFS for about half of the offices. That "about half" was the cause of my stumbling this time.
Display data increases year by year
In OFS, when you open the payroll data and select the relevant office, a table is displayed with years as rows and months as columns. At this time, if there is only 2026 data, there is one row of data. If there is also 2025 data, there are two rows. I had organized this as follows.

The month is specified by the number inside the eq() parentheses.
At first, the numbers were entered manually.
I changed this to a method of entering them using the current date and time acquisition. Until now, there was only 2026, so it wasn't a problem, but this time, when I want to acquire May 2026, there are cases of "16" and cases of "28". I considered registering the fiscal year update amounts first, but thinking about how differences in the number of rows will occur in the future, I decided it was better to perform maintenance now.
Suggestions from Gemini
When I consulted Gemini, it had the following suggestions:
- Approach A (Web-based selector change)
- Approach B (Read as a data table once)
I started with the recommended Approach A, but it didn't go well due to a series of errors.
- Switching to XPath format if CSS doesn't work
- Re-capturing UI elements
- Converting date/time to text, and text to numbers
- Creating new variables
I tried trial and error with these, but it didn't go well. While redoing it several times, I felt like I was going in circles, so I told Gemini, "I want to try Approach B (read as a data table once)," and started over.
"Extract data from web page" action - Right-click on Live Web Helper
To acquire the table, I used the "Extract data from web page" action. I had used it before, so I set it up without thinking, and got an error: "Parameter 'Extraction parameters': Cannot be empty." Even looking at the screen, I didn't know what to touch.
When I asked Gemini, it said, "With the action settings screen open, click on the target browser screen, and a small black window (or border) called 'Live Web Helper' will appear."
Live Web Helper, was there such a thing!
I tried it immediately, holding Ctrl and clicking just like with UI elements. No response... Reading Gemini's reply carefully, it said "right-click." Ah, I see.
I had set it up before, but since it's not an action I use frequently, it had completely slipped my mind.
Clicking the link on the web page for the target "year" row and "month" column
Once I overcame the settings, the data acquisition via RPA went smoothly.
This is the final hurdle. The biggest challenge.
First, for the year data, I set a variable called "RowIndexTable". For the month data, since it is a column name, action settings are unnecessary.
Then, I set variables for each row and column.
Finally, to click the link on the web page, I set the UI element. Here too, there were a series of errors.
- Converting strings to numbers and vice versa
- Looking at the HTML
- Trying changing whether to add +1 to the number of rows or columns
After all that back-and-forth, it worked when I wrote the following content into the editor.
> body > div > section > article > table > tbody > tr:eq(%WebRow%) > td:eq(%WebColumn%) a.month_linkImage of the part I changed this time

Summary
Like any job, it's best if you can complete tasks one by one in order, right? In practice, it's rarely a straight path, with things like "I'll do this part later," "This is waiting for data," or "I can't proceed without checking this." I think manual work often occurs during those irregular situations. That's exactly why I thought it's important to automate regular tasks (so-called routine tasks) to create breathing room and design them to handle future expectations. I learned a lot today too.
Thank you for reading until the end.
I hope this is helpful to someone.
