I want to click each row of the column “Dokumente”.
My current solution is to do a Data Scraping of the table (selecting column “Dokumente” and one other column).
Then I implemented a “For Each” activity referring to the output variable (DataTable; Default: NewSystem.Data.DataTable) of the Data Scraping.
Then I come to the first issue:
The “Double Click” I implemented thereafter is not working. The robot always clicks the first row (in a loop → so it would be endless without any progress)
So what do I need to adjust in order to let the robot check/click every row to the end?
Those elements with letters - A G S Z in row 1 for example - are all going to have similar selectors, with likely a single difference in a particular attribute. It could be ‘inner text’ for example which is set to A, G, S, Z etc for each element respectively.
You can use the Find Children activity to return a list of all those elements on the table and then filter that to return only those which contain the attributes common to A G S Z etc.
You should then have a list of all letter elements in the table. You can do a ForEach on all of these. This would contain a GetAttribute Activity and then an IF statement similar to:
FOR EACH element IN List:
InnerText = GetAttibute(‘innerText’)
IF InnerText = ‘U’
It can be difficult to initially grasp the use of Find Children but it can be a very powerful method to scrape and analyse data on web apps.
thanks for your quick reply.
I have to points which might lead to conflicts or further issues.
First, the table is bigger than the screen so that it’s scrollable. Thus I used “Data Scraping” in order to grasp all the rows. Is “Find Children” able to also search for elements which are not visible on the screen? Or do I have to combine “Find Children” with “Data Scraping”?
Second, it’s not intended to double click on the letter itself since then the document will open immediately.
But I want the request itself to be opened. So I have to double click on any other cell in this row.
So how can I assure that the robot double clicks the correct row even though he has to click in another column?
Find Children should be enough. No need to combine with Data Scraping. You may want to initiate scrolling down activities on the table before the Find Children is invoked as the full table will need to be loaded. However, that should be straightforward.
As for your need to click on any other cell on the table row, with regards to the letter elements, their selectors will have some indication of which row they are situated on. it is difficult to say what that will be, but I expect it should be obvious. Just compare, for example, the selector for A in row 1 and the selector for A in row 2, what attribute is different? I expect that attribute will also identify which row the other elements in, for example, column ‘Eingang am’ sit. Then you have your row identifier. Grab this when a ‘U’ is identified by your IF statement.
So instead of clicking the letter, once a ‘U’ is identified, simply use a selector with the shared attributes for the data in ‘Eingang am’, then feed it a row number variable into the row identifier attribute to click.
It may sound a little difficult, but its not. Just break it into its logical steps and it is quite straight forward. Nothing too complicated.
the requirements changed so that there is no more need for a character check.
It’s only necessary to click each row.
But I still face an issue…
After doing the Data Scraping and then adding a “For Each Row” activity (including “Click” on a specific column’s cells) the robot always clicks on the first row only. The selector I chose is as follows:
Even though I replaced the row’s number by * it’s not working.
What else do I have to do to make the roboter clicking on each row.
I thought the “For Each Row” should be enough. But apparently not…
Thanks in advance
That selector will click on the first element which matches the syntax provided. In this case it will always be the first row. If you want to click on each row in the table one by one, then you should possibly change the wildcard to a variable which represents the current row to click on.
There may be issues ongoing with the Click Text activity and bugs being identified.
I would suggest just using a click activity rather than ‘click text’.
Each of your Antragsnummer items will have similar selectors with just a variation in the attribute for the number itself, possibly innertext. You can create a selector for each number by adding a variable to replace, for example, innertext and place this alongside the common attributes of the Antragsnummer selectors. This can be tested using the UIExplorer to verify your selector syntax
Then I changed the number (‘innertext’) in the selector to the string variable “Antragsnummer” in order to click through all rows (via right click and “Choose variable”).
But then the validation of the selector fails: