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

How to view the running status in the currently active tab #673

Closed HelplessMan closed 2 years ago

HelplessMan commented 2 years ago

Hello

I want to check my current automaton running status in the webpage where the automaton script is currently running. A long time ago, there would be a small status in the lower right corner that the script was running. I don't know how to turn on this feature right now. please guide me

Kholid060 commented 2 years ago

Enable the "Show executed block on web page" in the workflow settings

LfOHzVdSKV

jddcef commented 1 year ago

It doesn't show anything for me when i turn it on, where is it supposed to appear?

HelplessMan commented 1 year ago

我打开它时它没有显示任何东西,它应该出现在哪里?

在浏览器的右下角,我打开后有时会出现有时不出现。 我找不到他出现的规律。。

Kholid060 commented 1 year ago

It only appears when the workflow is executing the block inside the "Web interaction" category (Click element, Attribute Value, Forms, etc)

jddcef commented 1 year ago

Wouldn't it make sense to show the status, as in, the whole time, if that option is on? Like, started, ended etc...

This brings me to another question, is there a way to add like a floating control panel of certain automa workflows... e.g. I want to have a set of buttons on a page that let's me run certain automa actions

Kholid060 commented 1 year ago

Wouldn't it make sense to show the status, as in, the whole time, if that option is on? Like, started, ended etc...

It makes sense, but there will be a conflict if multiple workflows running.

This brings me to another question, is there a way to add like a floating control panel of certain automa workflows... e.g. I want to have a set of buttons on a page that let's me run certain automa actions

You can add a floating button using the create element block, and using the automaExecWorkflow functions to execute the workflow. Import this workflow as a demo

{"extVersion":"1.21.3","name":"Loop Columns","icon":"riGlobalLine","table":[],"version":"1.21.3","drawflow":{"nodes":[{"computedPosition":{"x":96,"y":36,"z":0},"data":{"disableBlock":false,"description":"","type":"manual","interval":60,"delay":5,"date":"","time":"00:00","url":"","shortcut":"","activeInInput":false,"isUrlRegex":false,"days":[],"contextMenuName":"","contextTypes":[],"parameters":[],"observeElement":{"selector":"","baseSelector":"","matchPattern":"","targetOptions":{"subtree":false,"childList":true,"attributes":false,"attributeFilter":[],"characterData":false},"baseElOptions":{"subtree":false,"childList":true,"attributes":false,"attributeFilter":[],"characterData":false}},"triggers":[{"type":"manual","data":{"disableBlock":false,"description":"","type":"manual","interval":60,"delay":5,"date":"","time":"00:00","url":"","shortcut":"","activeInInput":false,"isUrlRegex":false,"days":[],"contextMenuName":"","contextTypes":[],"parameters":[],"observeElement":{"selector":"","baseSelector":"","matchPattern":"","targetOptions":{"subtree":false,"childList":true,"attributes":false,"attributeFilter":[],"characterData":false},"baseElOptions":{"subtree":false,"childList":true,"attributes":false,"attributeFilter":[],"characterData":false}}},"id":"cphx_"},{"id":"9tTGA","type":"visit-web","data":{"url":"http","isUrlRegex":false}}]},"dimensions":{"width":192,"height":72},"handleBounds":{"source":[{"id":"O_35SaStMu3BdI_xXqyoC-output-1","position":"right","x":196.00006535145002,"y":27.999957166459716,"width":16,"height":16}]},"id":"O_35SaStMu3BdI_xXqyoC","label":"trigger","position":{"x":96,"y":36},"selected":false,"type":"BlockBasic"},{"type":"BlockBasic","dimensions":{"width":192,"height":72},"handleBounds":{"source":[{"id":"erwk9ja-output-1","position":"right","x":196.00003215270166,"y":27.99999036520808,"width":16,"height":16}],"target":[{"id":"erwk9ja-input-1","position":"left","x":-20.000054772824164,"y":27.99999036520808,"width":16,"height":16}]},"computedPosition":{"x":388,"y":36,"z":0},"id":"erwk9ja","data":{"disableBlock":false,"description":"","javascript":"const buttons = [\n  { name: 'Workflow 1', workflowId: 'BsWqMxTniWnWuQ-UR59BD' },\n  { name: 'Workflow 2', workflowId: '' },\n];\n\nconst container = document.querySelector('#el-automa-container');\n\nbuttons.forEach((button) => {\n  const buttonEl = document.createElement('button');\n  buttonEl.textContent = button.name;\n  \n  buttonEl.addEventListener('click', () => {\n    automaExecWorkflow({ id: button.workflowId });\n  });\n\n  container.appendChild(buttonEl);\n});\n","html":"<div id=\"el-automa-container\">\n  \n</div>","css":"#el-automa-container {\n  position: fixed;\n  right: 20px;\n  bottom: 10px;\n  display: flex;\n  align-items: center;\n  padding: 10px 13px;\n  z-index: 9999;\n  background-color: white;\n  color: black !important;\n}\n\n#el-automa-container button {\n  padding: 8px 16px;\n  cursor: pointer;\n}\n","preloadScripts":[],"findBy":"cssSelector","insertAt":"after","runBeforeLoad":false,"waitForSelector":false,"waitSelectorTimeout":5000,"selector":"body"},"label":"create-element","position":{"x":388,"y":36},"selected":false}],"edges":[{"id":"vueflow__edge-O_35SaStMu3BdI_xXqyoCO_35SaStMu3BdI_xXqyoC-output-1-erwk9jaerwk9ja-input-1","target":"erwk9ja","source":"O_35SaStMu3BdI_xXqyoC","targetHandle":"erwk9ja-input-1","sourceHandle":"O_35SaStMu3BdI_xXqyoC-output-1","type":"custom","updatable":true,"selectable":true,"markerEnd":"arrowclosed","z":0,"sourceX":0,"sourceY":0,"targetX":0,"targetY":0}],"position":[136.59999999999997,279.20001831054685],"zoom":1.3},"settings":{"publicId":"GBGz2J5OJxRvVy9wHzrYc","restartTimes":3,"notification":false,"tabLoadTimeout":30000,"inputAutocomplete":true,"insertDefaultColumn":false,"defaultColumnName":"column","blockDelay":0,"debugMode":false,"executedBlockOnWeb":false,"onError":"stop-workflow","reuseLastState":false,"saveLog":false},"globalData":"{\n\t\"key\": \"value\"\n}","description":"","includedWorkflows":{}}

You only need to add the workflow name and the Id of the workflow to execute inside the Javascript tab of the create element block. You can find the workflow id in the tab URL chrome_xD5OPyf98i

jddcef commented 1 year ago

It makes sense, but there will be a conflict if multiple workflows running.

Why not just have an onscreen "console", where the status are written in a list that scroll by...

The button overlay example came in handy, thanks, now I can control things nicely with shortcuts on screen.

jddcef commented 1 year ago

You can add a floating button using the create element block, and using the automaExecWorkflow functions to execute the workflow. Import this workflow as a demo

Doesn't automaExecWorkflow seem to work anymore #1172