automation_model 1.0.51 → 1.0.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/locator.js +10 -4
  2. package/package.json +1 -1
package/bin/locator.js CHANGED
@@ -4,7 +4,7 @@ const tableSelector = null;
4
4
  document.tableSelector = tableSelector;
5
5
 
6
6
  // locator | operator | value
7
- // table.rowscount | >= | 1
7
+ // table.rows | >= | 1
8
8
  // table[1]["Availability"].text | equals | 100%
9
9
  // table[*][2].text |not_equals| error
10
10
 
@@ -23,14 +23,14 @@ function processTableQuary(table, quary) {
23
23
  }
24
24
 
25
25
  const rows = Array.from(table.querySelectorAll("tr, [data-blinq-role='row'], [role='row']"));
26
- tableData.rowscount = rows.length;
26
+ tableData.rows = rows.length;
27
27
  tableData.columnNames = [];
28
28
  let columnheader = [];
29
29
  if (rows.length > 0) {
30
30
  //const rowheader = rows[0];
31
31
  columnheader = Array.from(table.querySelectorAll("th, [data-blinq-role='columnheader'], [role='columnheader']"));
32
32
  console.log("columnheader length", columnheader.length);
33
- tableData.columnscount = columnheader.length;
33
+ tableData.columns = columnheader.length;
34
34
  for (let i = 0; i < columnheader.length; i++) {
35
35
  const cell = columnheader[i];
36
36
  const cellText = cell.innerText;
@@ -43,7 +43,13 @@ function processTableQuary(table, quary) {
43
43
  // }
44
44
 
45
45
  if (quary.startsWith("table.")) {
46
- return [tableData[quary.substring(6)]];
46
+ const result = [];
47
+ const property = quary.substring(6);
48
+ //console.log("property", property);
49
+ const value = tableData[property];
50
+ //console.log("value", value);
51
+ result.push(value);
52
+ return { cells: result };
47
53
  }
48
54
  const pattern = /^table\[(.+)\]\[(.+)\]\.(.+)$/;
49
55
  const match = quary.match(pattern);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "automation_model",
3
- "version": "1.0.51",
3
+ "version": "1.0.52",
4
4
  "description": "An automation infrastructure module to be use for generative AI automation projects.",
5
5
  "main": "bin/index.js",
6
6
  "type": "module",