Is there any way to get the text or UIElement from a position?
I have a table on a website that I need to fetch a cell from.
The HTML table has a column of IDs and a column of status.
I am finding the ID that matches my known ID value and storing the Y part of the position.
This is how I know what row I am on.
Then I go to the status column with a known X coordinate.
What is the best function for me to get the Text/UIElement at those coordinates?
example (I need the status of the object with an ID of '2'):
(should return "bad")
ID | etc | etc | Status | etc
----|-----|-----|--------|-----
0 | ... | ... | good | ...
----|-----|-----|--------|-----
1 | ... | ... | great | ...
----|-----|-----|--------|-----
2 | ... | ... | bad | ...
----|-----|-----|--------|-----
3 | ... | ... | good | ...
I know you can mouse click on a position, but how can I get the text(UIElement works too) of a position?
If there is a faster/more reliable method to get the status that doesn't involve coordinates, I'm all ears
Your best option would be to use UiPath's data scraping feature.
When used on an HTML Table it will return you a data table containing all of the data contained within the table.
You can then use a for each row activity that will loop through the table.
Inside the for each row activity, you can put an If statement with the following condition row("ID").ToString.Equals("THE ID YOUR LOOKING FOR, IN THIS CASE, 2")
In the true section of the If statement, you can have an assign activity to get the value of the status column which can be retrieved using the following row("Status").ToString. You can leave the false section empty as this won't be needed
Related
I have two Kusto tables in the same database, Open_Work_Items and Closed_Work_Items that appear respectively like so:
Item ID | Opened Date
1234 | <DateTime>
Item ID | Closed Date
1234 | <DateTime>
My issue is that I cannot remove work items from Open_Work_Items once the Item ID appears in Closed_Work_Items, but I would still like to query which work items are open. This means I need to find distinct Item IDs Open_Work_Items that do not appear in Closed_Work_Items, but I do not know which Kusto function(s) I can use to do so.
I've looked at Tabular and Scalar Operators, but I'm not understanding how I can combine them to get what I want here. Any help/advice would be appreciated!
Any help would be appreciated!
I think I figured it out:
Open_Work_Items | where Item_ID !in (Closed_Work_Items)
I'm using REGEXP_EXTRACT to get the last path of the Page Dimension in Google Data Studio. The Page URL has one identifier which is the same on all possible URLs:
+------------------------------------------------------+
| Page |
+------------------------------------------------------+
| /ABC/something1/something2/something3/lastpath |
| /ABC/something1/something2/something3/last path |
| /ABC/something1/something2/something3/last-path |
| /ABC/something1/something2/something3/last last-path |
+------------------------------------------------------+
So I want to extract the last path behind /something3/, all the values in the last directory.
Here is what I got:
REGEXP_EXTRACT(Page,'/ABC/([^/]+/){3}')
But this matches only the /something3/ directory.
Idea is to use capturing groups only for something you want extract. For everything else use the non-capturing (?:REGEX).
SELECT REGEXP_EXTRACT(
'/ABC/something1/something2/something3/last last-path',
'/ABC/(?:[^/]+/){3}(.+)');
To capture "all the values in the last directory" (all characters after the last /), the following REGEXP_EXTRACT Calculated Field does the trick:
REGEXP_EXTRACT(Page, "([^/]*)$")
Google Data Studio Report as well as a GIF to elaborate:
I'm trying to select records by filtering value on a map column.
name (text) | last (text) | languages(map<text:text>)
john | stith | {12:English, 123:Spanish}
Jane | Doe | {34:Italian, 123:Spanish}
I'm trying select records have only have Italian as a value. but on the documentation only shows how to get records from the by the key.
by filtering by Italian I should get Jane Doe on the example above. How can I accomplish my filtering?
you need to create an index on value of the map.
Assuming an index on map value is created, filter the data using a value in the map
SELECT * FROM table WHERE languages CONTAINS 'Italian';
To create an index on the values
CREATE INDEX mymapvalues ON tableName(languages);
see here for more info
https://docs.datastax.com/en/cql/3.1/cql/ddl/ddlIndexColl.html
I'm trying to create accessible table which Adobe Reader pronounce 'correctly'. It means that before pronouncing contents of the cell it speaks name of the header of the current column (or row). (It explained better at the first link below).
For this I've created single-page document with a table like this.
+------+-----+-----+
| Name | Sex | Age |
+------+-----+-----+
|Antony|Male | 26 |
+------+-----+-----+
|Robert|Male | 36 |
+------+-----+-----+
Then with "Touch Up Reading Order" tool I've changed properties of each cell to create references to header cells.
It expected to pronounce:
"Name. Antony. Sex. Male. Age. Twenty six. Name. Robert. Sex. Male. Age. Thirty six."
But it read table row by row.
Maybe I didn't enable something?
I've used this links to prepare document:
http://teachingcommons.cdl.edu/access/docs_multi/pdf_vid_tut/repair_docs/identifying/identifying_table_headers.shtml (Associating Data Cells to Row and Column Headers)
http://www.the508compliantpdf.com/creating_complex_tables_in_indesign_and_acrobat/
I've got an sqlite table which contains start/stop timestamps. I would like to create a query which returns a total elapsed time from there.
Right now I have a SELECT (e.g. SELECT t,type FROM event WHERE t>0 AND (name='start' or name='stop) and eventId=xxx ORDER BY t) which returns a table which looks something like this:
+---+-----+
|t |type |
+---+-----+
| 1|start|
| 20|stop |
|100|start|
|150|stop |
+---+-----+
To produce the total elapsed time in the above example would be accomplished by (20-1)+(150-100) = 69
One idea I had was this: I could run two separate queries, one for the "start" fields and one for the "stop" fields, on the assumption that they would always line up like this:
+---+---+
|(1)|(2)|
+---+---+
| 1| 20|
|100|150|
+---+---+
(1) SELECT t FROM EVENT where name='start' ORDER BY t
(2) SELECT t FROM EVENT where name='stop' ORDER BY t
Then it would be simple (I think!) to just sum the differences. The only problem is, I don't know if I can join two separate queries like this: I'm familiar with joins that combine every row with every other row and then eliminate those that don't match some criteria. In this case, the criteria is that the row index is the same, but this isn't a database field, it's the order of the resulting rows in the output of two separate selects - there isn't any database field I can use to determine this.
Or perhaps there is some other way to do this?
I do not use SQLite but this may work. Let me know.
SELECT SUM(CASE WHEN type = 'stop' THEN t ELSE -t END) FROM event
This assumes the only values in type are start/stop.