@brasilindoc/rpa
v1.4.4
Published
Biblioteca de processos de RPA
Downloads
22
Readme
@brasilindoc/rpa
Biblioteca de processos de RPA utilizando Node.js/Typescript e Puppeteer
Instalação
npm i @brasilindoc/rpa
Versão do Node >= 18.14.0
.env
| NOME PROPRIEDADE | VALOR | | -------------------- | ------------------------------ | | TWO_CAPTCHA_TOKEN | [API_KEY] |
TWO_CAPTCHA_TOKEN="eqeqeuqueq..."
Uso
import { RPAService } from "@brasilindoc/rpa/core/services/RPAService";
const result = await rpaService.getInfo('https://google.com', {
pathsToWrite: [{ xpath: '#APjFqb', value: 'teste pesquisa puppeteer' }],
pathsToRead: {
firstResult:
'#rso > div:nth-child(1) > div > div > div > div.kb0PBd.cvP2Ce.A9Y9g.jGGQ5e > div > div > span > a > h3',
},
xpathSubmit:
'body > div.L3eUgb > div.o3j99.ikrT4e.om7nvf > form > div:nth-child(1) > div.A8SBwf > div.FPdoLc.lJ9FBc > center > input.gNO89b',
})
console.log(result)
/**
{
firstResult: 'Teste funcionalidade...'
}
*/
import { CitizenGovernment } from "@brasilindoc/rpa/functions/citizen-government/CitizenGovernment";
new CitizenGovernment().getFromFederalRecipe({
cpf: '691.333.203-30',
birthDate: new Date('1993-11-15')
});