I have this command:
{
"Command": "executeScript_Sandbox",
"Target": "const audio = new Audio(\"https://translate.google.com/translate_tts?ie=UTF-8&tl=en&client=tw-ob&q=Testing+UI+Vision+audio\");\naudio.play();",
"Value": "",
"Description": ""
},
It used to play fine. But now with the V7.0.7, I can’t run this command.
I changed it into executeScript
but it still doesn’t work.
What should I do?
admin
April 24, 2022, 11:13pm
2
Interesting, I confirmed the problem. We will look into it.
If you have more such conversion issues, please post them here and we will check it ASAP.
1 Like
admin
April 26, 2022, 8:25pm
3
Developments tells us that the challenge with Audio
is that the play action has to be triggered by a real user input like clicks. The previous executeScript_Sandbox
could work around that previously probably because it’s an extension page instead of a normal page. But manifest V3 blocks this.
admin
April 26, 2022, 8:26pm
4
Here is a solution for audio replay. The “trick” is to use selectWindow | TAB=OPEN | url to audio
{
"Name": "audio",
"CreationDate": "2022-4-26",
"Commands": [
{
"Command": "open",
"Target": "https://ui.vision",
"Value": "",
"Description": ""
},
{
"Command": "selectWindow",
"Target": "TAB=OPEN",
"Value": "https://translate.google.com/translate_tts?ie=UTF-8&tl=en&client=tw-ob&q=Testing+UI+Vision+audio",
"Description": "Play audio in new tab"
},
{
"Command": "selectWindow",
"Target": "TAB=0",
"Value": "",
"Description": "Go back to main tab to continue with the macro"
},
{
"Command": "clickAndWait",
"Target": "linkText=Enterprise-Grade Security",
"Value": "",
"Description": "...this line continues the main macro"
}
]
}
1 Like
how can I close the new tab? @admin
admin
May 1, 2022, 9:39am
6
1 Like
This works fine:
{
"Command": "executeScript",
"Target": "var audio = new Audio(\"http://codeskulptor-demos.commondatastorage.googleapis.com/descent/gotitem.mp3\");\naudio.play();",
"Value": "",
"Description": ""
}