AutomaApp / automa

A browser extension for automating your browser by connecting blocks
https://www.automa.site
Other
11.33k stars 1.21k forks source link

{{ }} #243

Closed whwh656 closed 2 years ago

whwh656 commented 2 years ago

automa v12.0 image image image image image

I try add double quote in {{prevBlockData@ret }} it doesn't work either

Kholid060 commented 2 years ago

Have you checked whether the ret data exist in the workflow log?

chrome_WEHRj5Gi6W

And I think there's an error in your javascript code, you can't re-assign a variable that you declared with const and use let instead.

let ret = 0

if (textlen == 3) {
  ret = 1;
} else {
  ret = 'ddd'
}

automaNextBlock({ ret });
whwh656 commented 2 years ago

image image

The root cause is the automaRefData() don't get value of variable test, if I want to get the length of arrary of get text block in javascript block, How should I write

Kholid060 commented 2 years ago

Have you tried write automaRefData('dataColumns', '0.test'), it's cause an error because Automa doesn't recognise text column.

147929098-5617ae31-ef86-41f5-a8ec-6f2678d206d2 147928969-8fca5198-16bb-476f-9717-ff2d94111af3

whwh656 commented 2 years ago

Have you tried write automaRefData('dataColumns', '0.test'), it's cause an error because Automa doesn't recognise text column.

147929098-5617ae31-ef86-41f5-a8ec-6f2678d206d2 147928969-8fca5198-16bb-476f-9717-ff2d94111af3

I try it it doesn't work testbaidu.txt

Kholid060 commented 2 years ago

I try it it doesn't work testbaidu.txt

Can you explain what the workflow suppose to do? Because it's working when I tested it

image image

whwh656 commented 2 years ago

image image

I try it it doesn't work testbaidu.txt

Can you explain what the workflow suppose to do? Because it's working when I tested it

image image

the workflow is green ,but srceenshot'name doesn't get from javascrit block

Kholid060 commented 2 years ago

It doesn't work because the prevBlockData object doesn't have the ret key. Because in the javascript block you write automaRefData({ a }). To fix this you can write automaRefData({ ret }), or if you want to name the screenshot based on the column length you can write automaRefData({ ret: a }).

const a = automaRefData('dataColumns', '0.test').length;
var ret = 0
automaNextBlock({ ret: a })
whwh656 commented 2 years ago

thanks