Skip to main content

const deviceManagement = document.querySelector('body > form:nth-child(21) > table:nth-child(4) > tbody:nth-child(1) > tr:nth-child(2) > td:nth-child(1) > div:nth-child(6) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(6) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(2)');
deviceManagement.dispatchEvent(new MouseEvent('mouseover', { bubbles: true }));

setTimeout(() => {
  const deviceList = document.querySelector('body > div:nth-child(18) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(2)');
  deviceList.click();
}, 1000);

I have this code but i can’t able to run it in the java script action.

Hello, I am experiencing a similar issue with having code that works but I am unable to get it to run in AA360. Were you able to get this resolved?


I’m having the same issue with the following code, which runs fine. But any attempt to use RegExp in javascript is returning “bot error”.

 

function string_parse(source, regex) {
    return source.match(new RegExp(regex)).toString();
}

results = string_parse(
    'PCAGoldenValleyMinneapolisOpportunities_ST20240501-ED20241101_20240820-0855-PACOA-FRV.xls',
    '^(rA-Za-z0-9\\-]+)_ST(\\d{8})-ED(\\d{8})_((\\d{8}-\\d{4})-({A-Za-z0-9]+)-AA-Za-z0-9]+)\\.xls'
    //'^(?<Description>DA-Za-z0-9\\-]+)_ST(?<StartDate>\\d{8})-ED(?<EndDate>\\d{8})_(?<BidId>(?<BidDateTime>\\d{8}-\\d{4})-(?<BidCustomerCode>uA-Za-z0-9]+)-;A-Za-z0-9]+)\\.xls'
);

console.log(results);
 


Reply