ogrlion
November 30, 2021, 10:53am
1
I have a macro that opens random words generator web page, generate words a clicks a button that copy that word to clipboard. Macro worked for weeks but stopped working last week. The button works manually, even works if I execute only the command that click the button. But if I run complety macro variable !clipboard does not change. Xclick doesnt work either.
{
"Command": "open",
"Target": "https://wordcounter.net/random-word-generator",
"Value": "",
"Description": ""
},
{
"Command": "click",
"Target": "id=random-words",
"Value": "",
"Targets": [
"id=random-words",
"name=random-words",
"xpath=//*[@id=\"random-words\"]",
"xpath=//input[@id='random-words']",
"xpath=//div[6]/div/div/div/div/input",
"css=#random-words"
],
"Description": ""
},
{
"Command": "click",
"Target": "xpath=//*[@id=\"wordList\"]/span",
"Value": "",
"Targets": [
"xpath=//*[@id=\"wordList\"]/span",
"xpath=//span[@onclick='setInDiv(this);']",
"xpath=//p[2]/span",
"css=#wordList > span:nth-child(1)"
],
"Description": ""
},
{
"Command": "click",
"Target": "xpath=/html/body/div[6]/div/div/div/div[2]/input[2]",
"Value": "",
"Targets": [
"xpath=/html/body/div[6]/div/div/div/div[2]/input[2]",
"xpath=//input[@value='Copy Words']",
"xpath=//input[2]",
"css=body > div.container > div > div.row > div > div:nth-child(2) > input:nth-child(5)"
],
"Description": ""
},
{
"Command": "store",
"Target": "${!clipboard}",
"Value": "",
"Description": ""
admin
November 30, 2021, 1:31pm
3
It works for me:
I use echo | ${!clipboard} |green
to show the clipboard value.
Macro:
{
"Name": "forum1",
"CreationDate": "2021-11-30",
"Commands": [
{
"Command": "open",
"Target": "https://wordcounter.net/random-word-generator",
"Value": "",
"Description": ""
},
{
"Command": "click",
"Target": "id=random-words",
"Value": "",
"Targets": [
"id=random-words",
"name=random-words",
"xpath=//*[@id=\"random-words\"]",
"xpath=//input[@id='random-words']",
"xpath=//div[6]/div/div/div/div/input",
"css=#random-words"
],
"Description": ""
},
{
"Command": "click",
"Target": "xpath=//*[@id=\"wordList\"]/span",
"Value": "",
"Targets": [
"xpath=//*[@id=\"wordList\"]/span",
"xpath=//span[@onclick='setInDiv(this);']",
"xpath=//p[2]/span",
"css=#wordList > span:nth-child(1)"
],
"Description": ""
},
{
"Command": "click",
"Target": "xpath=/html/body/div[6]/div/div/div/div[2]/input[2]",
"Value": "",
"Targets": [
"xpath=/html/body/div[6]/div/div/div/div[2]/input[2]",
"xpath=//input[@value='Copy Words']",
"xpath=//input[2]",
"css=body > div.container > div > div.row > div > div:nth-child(2) > input:nth-child(5)"
],
"Description": ""
},
{
"Command": "echo",
"Target": "${!clipboard}",
"Value": "green",
"Description": ""
}
]
}
ogrlion
November 30, 2021, 2:39pm
4
Thank you, still does not work on my end I even copied your code. At least I know issue is on my pc.
admin
November 30, 2021, 3:44pm
5
What browser are you using? I tested with Chrome (but it should work in all).
ogrlion
November 30, 2021, 4:05pm
6
Also chrome and it worked fine for weeks. Could it be some security update my company did as it’s company pc or some settings in Windows? Nothing else comes to mind. My college have the same issue on other company pc. Don’t have my personal pc to test it atm.