.title-34321. так как названия везде разные, а этот css класс везде один и тот же
function getRandomInt(max) {
return Math.floor(Math.random() * max);
}
console.log(getRandomInt(3));
// Expected output: 0, 1 or 2
console.log(getRandomInt(1));
// Expected output: 0
console.log(Math.random());
// Expected output: a number from 0 to <1
function getRandomInt(max) {
return Math.floor(Math.random() * max);
}
console.log(getRandomInt(3));
// Expected output: 0, 1 or 2
console.log(getRandomInt(1));
// Expected output: 0
console.log(Math.random());
// Expected output: a number from 0 to <1
{"extVersion":"1.28.1","name":"1231231231231231","icon":"riGlobalLine","table":[],"version":"1.28.1","drawflow":{"nodes":[{"computedPosition":{"x":100,"y":352.5,"z":0},"data":{"activeInInput":false,"contextMenuName":"","contextTypes":[],"date":"","days":[],"delay":5,"description":"","disableBlock":false,"interval":60,"isUrlRegex":false,"observeElement":{"baseElOptions":{"attributeFilter":[],"attributes":false,"characterData":false,"childList":true,"subtree":false},"baseSelector":"","matchPattern":"","selector":"","targetOptions":{"attributeFilter":[],"attributes":false,"characterData":false,"childList":true,"subtree":false}},"parameters":[],"preferParamsInTab":false,"shortcut":"","time":"00:00","type":"manual","url":""},"dimensions":{"width":192,"height":72},"dragging":false,"events":{},"handleBounds":{"source":[{"id":"HhD6IDa-ekv40LzMRQnaK-output-1","position":"right","x":195.99995421085106,"y":28.000001163194874,"width":16,"height":16}]},"id":"HhD6IDa-ekv40LzMRQnaK","initialized":true,"label":"trigger","position":{"x":100,"y":352.5},"resizing":false,"selected":false,"type":"BlockBasic"},{"computedPosition":{"x":338.41664094353314,"y":357.77812294917175,"z":0},"data":{"disableBlock":false,"onError":{"retry":false,"enable":false,"retryTimes":1,"retryInterval":2,"toDo":"error","insertData":false,"dataToInsert":[]},"settings":{"blockTimeout":0,"debugMode":false}},"dimensions":{"width":192,"height":72},"dragging":false,"events":{},"handleBounds":{"source":[{"id":"l01k0hs-output-1","position":"right","x":195.9998463478249,"y":28.00005509470795,"width":16,"height":16}],"target":[{"id":"l01k0hs-input-1","position":"left","x":-20.000070171370293,"y":28.00005509470795,"width":16,"height":16}]},"id":"l01k0hs","initialized":true,"label":"active-tab","position":{"x":338.41664094353314,"y":357.77812294917175},"resizing":false,"selected":false,"type":"BlockBasic"},{"computedPosition":{"x":894.1233529090041,"y":654.7522719676184,"z":0},"data":{"disableBlock":false,"description":"работа","findBy":"xpath","waitForSelector":false,"waitSelectorTimeout":5000,"selector":"/html/body/div[1]/div/div[2]/div/div[2]/div[1]/div/div/div[1]/div[3]/a","markEl":false,"multiple":false},"dimensions":{"width":192,"height":72},"dragging":false,"events":{},"handleBounds":{"source":[{"id":"bjzbdr3-output-1","position":"right","x":195.99995421085106,"y":28.000001163194874,"width":16,"height":16}],"target":[{"id":"bjzbdr3-input-1","position":"left","x":-19.999962308344145,"y":28.000001163194874,"width":16,"height":16}]},"id":"bjzbdr3","initialized":true,"label":"event-click","position":{"x":894.1233529090041,"y":654.7522719676184},"resizing":false,"selected":false,"type":"BlockBasic"},{"type":"BlockBasic","dimensions":{"width":192,"height":72},"handleBounds":{"source":[{"id":"2s3enic-output-1","position":"right","x":196.0000620738772,"y":28.000001163194874,"width":16,"height":16}],"target":[{"id":"2s3enic-input-1","position":"left","x":-20.000070171370293,"y":28.000001163194874,"width":16,"height":16}]},"computedPosition":{"x":922.2722513980482,"y":138.94961905971604,"z":0},"selected":false,"dragging":false,"resizing":false,"initialized":true,"data":{"disableBlock":false,"description":"животные","findBy":"cssSelector","waitForSelector":false,"waitSelectorTimeout":5000,"selector":"/html/body/div[1]/div/div[2]/div/div[2]/div[1]/div/div/div[4]/div[3]/a","markEl":false,"multiple":false},"events":{},"position":{"x":922.2722513980482,"y":138.94961905971604},"label":"event-click","id":"2s3enic"}],"edges":[{"id":"vueflow__edge-HhD6IDa-ekv40LzMRQnaKHhD6IDa-ekv40LzMRQnaK-output-1-l01k0hsl01k0hs-input-1","data":{},"events":{},"markerEnd":"arrowclosed","selectable":true,"source":"HhD6IDa-ekv40LzMRQnaK","sourceHandle":"HhD6IDa-ekv40LzMRQnaK-output-1","target":"l01k0hs","targetHandle":"l01k0hs-input-1","type":"custom","updatable":true},{"id":"vueflow__edge-l01k0hsl01k0hs-output-1-2s3enic2s3enic-input-1","source":"l01k0hs","sourceHandle":"l01k0hs-output-1","target":"2s3enic","targetHandle":"2s3enic-input-1","class":"source-l01k0hs-output-1 target-2s3enic-input-1","updatable":true,"type":"custom","selectable":true,"markerEnd":"arrowclosed","data":{},"events":{}},{"id":"vueflow__edge-l01k0hsl01k0hs-output-1-bjzbdr3bjzbdr3-input-1","source":"l01k0hs","sourceHandle":"l01k0hs-output-1","target":"bjzbdr3","targetHandle":"bjzbdr3-input-1","class":"source-l01k0hs-output-1 target-bjzbdr3-input-1","updatable":true,"type":"custom","selectable":true,"markerEnd":"arrowclosed","data":{},"events":{}}],"position":[120.39433418902229,224.0654951548952],"zoom":0.49260788411587936},"settings":{"blockDelay":0,"debugMode":false,"defaultColumnName":"column","execContext":"popup","executedBlockOnWeb":false,"inputAutocomplete":true,"insertDefaultColumn":false,"notification":true,"onError":"stop-workflow","publicId":"","restartTimes":3,"reuseLastState":false,"saveLog":true},"globalData":"{\n\t\"key\": \"value\"\n}","description":"","includedWorkflows":{}}
if (document.all !== undefined)
{
var items = document.all;
}
else
{
var items = document.getElementsByTagName("*");
};
for (var i = 0; i < items.length; ++i) {
if (items[i].textContent.includes("New Text")) {
console.log("success");
items[i].click();
break;
}
}