{"_id":"@concordialang-healer/heuristics-web","_rev":"4-c19d282ed85ec45476d0b49f7f09caa1","name":"@concordialang-healer/heuristics-web","dist-tags":{"latest":"1.0.2-alpha.0"},"versions":{"1.0.0":{"name":"@concordialang-healer/heuristics-web","version":"1.0.0","description":"Heuristics for concordialang-healer","author":{"name":"Lucas Az.","email":"lucas-azevedo20@outlook.com"},"homepage":"https://github.com/concordialang/healer/tree/main/packages/heuristics-web#readme","license":"AGPL-3.0","main":"dist/index.js","repository":{"type":"git","url":"git+https://github.com/concordialang/healer.git"},"scripts":{"test":"ts-mocha -p tsconfig.json **/*.spec.ts","build":"tsc"},"bugs":{"url":"https://github.com/concordialang/healer/issues"},"publishConfig":{"access":"public"},"devDependencies":{"@types/jsdom":"^16.2.13","jsdom":"^17.0.0","ts-mocha":"^8.0.0","typescript":"*"},"dependencies":{"@concordialang-healer/common":"^1.0.0"},"gitHead":"30952d8ca8d1e949c9fa961cc4e1e189655af91d","_id":"@concordialang-healer/heuristics-web@1.0.0","_nodeVersion":"14.17.1","_npmVersion":"lerna/4.0.0/node@v14.17.1+x64 (linux)","dist":{"integrity":"sha512-qXo8gSdp6qS58N/Dh72c47eMtPpqUFWYOcAufR4jKQMVa0raKyPcdE3F4eoMERS2K/wI/y/Cr3Fca7TzWnXxzg==","shasum":"2697a32a988b83723f8744e611803dcae995c5b6","tarball":"https://registry.npmjs.org/@concordialang-healer/heuristics-web/-/heuristics-web-1.0.0.tgz","fileCount":25,"unpackedSize":47277,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiAsHBCRA9TVsSAnZWagAASYQP/29OZG/WmuGsddN2Numi\nyLEZlSHWqwkrdY3HgjhSqkDHV9qlSXPpClD0iL+dzU9HTvgvH4DIPuqrOFDc\nbS1INcA8bIzevfMEv+cyEB3TU96SI3suUKqCUEcAL4Bd7jnpraeXXWrcaWoc\nVrULwosWqyjGTKslQddaEW/9722fqyGH4XWvllyAsKfTImmXokh0RlXJQ+2D\n22O6vSvWC8NSmCfTjZZcrs8jdgTgugaqilnxo/YEiH9qCgSq8afZcEK4ugkH\ni5nUg6ExpCv4DvRXJYKGZShHiFmADLR4JUrH7rxmWmSB0I4rgFB1j0Giq1dG\n2VDG4PLa8omQQdoqSe1lcC8N8APOdj5jST47SJcvdD27OayjJfqarlaAkFtv\nEqD/5IbwZg703y+oI+w48ooaq7a10qTw8rkUpuUqY3tzJL7sOPslS+nOl6jY\nC2a88kKTpIP3Q2ovXdG1sTnW73jghDBwZDRS7KtKz8r6mugna6umCmERGz+N\nRZlz9bMHbOiBK/1JNonKFVJmnglNREfX4+b5gWQ0+1tnDuYKE4p8Q7QBvmdR\nFRq6qi5f/kocdb82Xtrn6c3GYW/2+vWrtaLi2ueUyr8NvhR6sg9c19wC2ZR5\nJzdfwJor6RRiszbgIB8Pn9vL9Vao5z00nJ5VKsNftT9eD3Y4fpV6dmWpJVDs\nnoYe\r\n=J6B6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEcZmvrDx0JTpSxpJehTBJPT38rd3ao5OfG8EN2U5uy6AiAVXW1qAyh7WJq3meUgFwwcTjGq4eJERM8rDlEHvi9j6Q=="}]},"_npmUser":{"name":"lucas-az","email":"lucas-azevedo20@outlook.com"},"directories":{},"maintainers":[{"name":"lucas-az","email":"lucas-azevedo20@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heuristics-web_1.0.0_1644347841338_0.2595072719642555"},"_hasShrinkwrap":false},"1.0.1-alpha.0":{"name":"@concordialang-healer/heuristics-web","version":"1.0.1-alpha.0","description":"Heuristics for concordialang-healer","author":{"name":"Lucas Az.","email":"lucas-azevedo20@outlook.com"},"homepage":"https://github.com/concordialang/healer/tree/main/packages/heuristics-web#readme","license":"AGPL-3.0","main":"dist/index.js","repository":{"type":"git","url":"git+https://github.com/concordialang/healer.git"},"scripts":{"test":"ts-mocha -p tsconfig.json **/*.spec.ts","build":"tsc"},"bugs":{"url":"https://github.com/concordialang/healer/issues"},"publishConfig":{"access":"public"},"devDependencies":{"@types/jsdom":"^16.2.13","jsdom":"^17.0.0","ts-mocha":"^8.0.0","typescript":"*"},"dependencies":{"@concordialang-healer/common":"^1.0.0"},"gitHead":"b622949c3ad02195c3ca9e2ecc42d4bee5e16c6e","_id":"@concordialang-healer/heuristics-web@1.0.1-alpha.0","_nodeVersion":"14.17.1","_npmVersion":"lerna/4.0.0/node@v14.17.1+x64 (linux)","dist":{"integrity":"sha512-QIChR4jqDwHTGHDK9lLvbDdgFrDkzQCbANipw5+kdVC2dDvf73kS2Vr98kZRkSq0LwJrIblnOL1fuEpM8WM6uA==","shasum":"e389f94245d68c4bf953a151e06e8ace99d1cddd","tarball":"https://registry.npmjs.org/@concordialang-healer/heuristics-web/-/heuristics-web-1.0.1-alpha.0.tgz","fileCount":25,"unpackedSize":46932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiERBFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqXWw/9GLnIeuEQ7/5GlS77qhWe4lwKmds9ELC5IVmgVbA52YAtDN8F\r\n36a/estL5Z52C2jcdC9O8bHrA2lVsuPknkEXYZvqRDdZHA6Nj17V4fapsQqq\r\n50ujdGx78AqEchuGf9zyYNV3wU9GjDnt6gogGD9EDi0cwU11DQf5wsVQ9mia\r\nr+FM9MBwG8k20iMTBHg40uXu1TITmJ5gfdfVAfCkM4Zi/xoXz2di61kH06JC\r\nc1/gH9HYJ55Okwyvx4m9X65hoUKtHkCPaF6ETh/iabXsnI4c3XCa4lAjx47h\r\n1KrOSnT5eDBbWHwZGdppVnNtk0i3Gg3iEHW7Ew3M281mrRFgpf+aE5GsZCXb\r\nWMKOmfIFZKbO9+AQ5Sjjf9HAkyPqOYd8e1D02fdZVVW81u/F/6KJ3BYrYXFF\r\n6cxldpNPCmNjVnxNrtu6HG2Hy6IbYWUam4j2EqK2Nvgo9qbGLeP3Mlx6CALL\r\nhDj6h6Tr8Vt8LjuTqfzPmKoPDT2JZAYTOR/Y7LBfiAZ9KQjCJyQC54S19h3t\r\nOKWClnoXpPd/Oy85tdTbuL/62g0/zcP3OGRAOKOYhXhZIZy8h5k8rejgvA06\r\n9OZ6MORtCyNuR+hrnlAzyJCjjyhPmvpE/r+tmMhOoz98KI1Tz2NebEZpxaIT\r\nr+CA96AQdjuApYmSKleGf66RpGDb8pRUEPE=\r\n=8il3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSmNL0M4n1bw33dFLKRiLX0L1c2E8/0S4NexJ+fguV1QIgC5zdPl34T9BalkeiSNMVYZP/+79FkfMFrR53j4IgK4I="}]},"_npmUser":{"name":"lucas-az","email":"lucas-azevedo20@outlook.com"},"directories":{},"maintainers":[{"name":"thiagodp","email":"thiago_dp@yahoo.com.br"},{"name":"lucas-az","email":"lucas-azevedo20@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heuristics-web_1.0.1-alpha.0_1645285445521_0.4551024995938213"},"_hasShrinkwrap":false},"1.0.2-alpha.0":{"name":"@concordialang-healer/heuristics-web","version":"1.0.2-alpha.0","description":"Heuristics for concordialang-healer","author":{"name":"Lucas Az.","email":"lucas-azevedo20@outlook.com"},"homepage":"https://github.com/concordialang/healer/tree/main/packages/heuristics-web#readme","license":"AGPL-3.0","main":"dist/index.js","repository":{"type":"git","url":"git+https://github.com/concordialang/healer.git"},"scripts":{"test":"ts-mocha -p tsconfig.json **/*.spec.ts","build":"tsc"},"bugs":{"url":"https://github.com/concordialang/healer/issues"},"publishConfig":{"access":"public"},"devDependencies":{"@types/jsdom":"^16.2.13","jsdom":"^17.0.0","ts-mocha":"^8.0.0","typescript":"*"},"dependencies":{"@concordialang-healer/common":"^1.0.0"},"gitHead":"763f30927ab81b7f9f7c9b9e2ce6d670c9a6c842","_id":"@concordialang-healer/heuristics-web@1.0.2-alpha.0","_nodeVersion":"14.17.1","_npmVersion":"lerna/4.0.0/node@v14.17.1+x64 (linux)","dist":{"integrity":"sha512-HU2QZ4tlBYnWGZAG5+Tzr2gD/FPetA433ujfVIfbJDXUrXvL86KqHLynWRkI0d4oBtLYhlQtLugxc/t8jfb6Xg==","shasum":"e69785a7a433ad6da129de63114ceca79b20f027","tarball":"https://registry.npmjs.org/@concordialang-healer/heuristics-web/-/heuristics-web-1.0.2-alpha.0.tgz","fileCount":25,"unpackedSize":47067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEmzFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqdkg//SZu0GklzFqza47CogRu0ASxSzULfcehwr1oHtHm2s351uzN/\r\nXfnw0Vl1pxB71nhjQ3yZXWop6BNPIjLTrMSXZ3E9BIqIoD09IIUaekNo+lIJ\r\nHUG/vcrW1DLh7v+u/tV3DGUpzQzA3MiheCpen+XaOAHvw7KQfd9IEIsO+aMW\r\ncgasNEwGKmiNbVKeItHHsgCY7aEzGKzcD+HGF5pVQRI0ghlZrfE9nD0WJ9v7\r\nDwWkP0AXScC1GkRGmVYA5A5fy9SSD1QWME9bn0w71rBqTJ5PDMeIn2illVv1\r\nXZshgxB+ukfMwOjgHzb0nTpNe/0TAXuUqhY9T+eNL+YncK6lbfjlWai2GC0E\r\ny9TZlrSeGgzXnRU0G7JNGr5ydIxDxp5ctzzKXvGK2ee3PZ/PVTTm9kwD36RZ\r\nhILdObA+O1OQO1yna+zUsrvTdoIlXIeafAM6Ij/SsqxMAIRAH5YEwwx9vVf/\r\nlcI77injD0CAEbQRkXMNvfJEPZTqEkXJWZbKGoPV37UANmPttqUhxfi/l8C7\r\nWQia0Nu+Y9i9jiU6o2vXyh8+1Ph2P/MRuQdB4R8MoIl2MvpVWdFL67bEsPTx\r\ncYR70Qaz55W01Uje9fjRxdDq+P5MyMXOZJ9Sg1JJi+wHznQOI0YG33u3WXOH\r\n8gQE65qu7VXDeqM9IaM5JfF6dqZfn5Fq8Rc=\r\n=Pe7W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDBGwEPmi95nRzQFzLZJsewbYjC5n2Rv/5ltj20EYflBAiEAoF4cRpp9J5ns9SEFzIuPbx2EXRDMq25XjDzWFKDOfbg="}]},"_npmUser":{"name":"lucas-az","email":"lucas-azevedo20@outlook.com"},"directories":{},"maintainers":[{"name":"thiagodp","email":"thiago_dp@yahoo.com.br"},{"name":"lucas-az","email":"lucas-azevedo20@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heuristics-web_1.0.2-alpha.0_1645374661274_0.2237839570742004"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-08T19:17:21.264Z","1.0.0":"2022-02-08T19:17:21.536Z","modified":"2022-04-05T00:46:35.022Z","1.0.1-alpha.0":"2022-02-19T15:44:05.735Z","1.0.2-alpha.0":"2022-02-20T16:31:01.478Z"},"maintainers":[{"name":"thiagodp","email":"thiago_dp@yahoo.com.br"},{"name":"lucas-az","email":"lucas-azevedo20@outlook.com"}],"description":"Heuristics for concordialang-healer","homepage":"https://github.com/concordialang/healer/tree/main/packages/heuristics-web#readme","repository":{"type":"git","url":"git+https://github.com/concordialang/healer.git"},"author":{"name":"Lucas Az.","email":"lucas-azevedo20@outlook.com"},"bugs":{"url":"https://github.com/concordialang/healer/issues"},"license":"AGPL-3.0","readme":"[![npm (tag)](https://img.shields.io/npm/v/@concordialang-healer/heuristics-web?color=blue&style=flat-square)](https://www.npmjs.com/package/@concordialang-healer/heuristics-web)\n\n# `@concordialang-healer/heuristics-web`\n\n> 🔌 Heurísticas para `concordialang-healer`\n\nFornece _plugins_ de heurísticas para utilizar em conjunto com [`concordialang-healer`](https://github.com/concordialang/healer#readme).\n\nSão heurísticas para interface HTML.\n\n## Instalação\n\nInstale pelo `npm`:\n\n```bash\nnpm install @concordialang-healer/heuristics-web --save-dev\n```\n\n👉 Obs.: Você também pode instalar pelo `yarn`.\n\n## Configuração\n\nAdicione as entradas na configuração do `concordialang-healer` (geralmente `.healerrc.json`):\n\n```json\n{\n  \"heuristics\": [\n    {\n      \"name\": \"by-id\",\n      \"from\": \"@concordialang-healer/heuristics-web\"\n    },\n    {\n      \"name\": \"by-classes\",\n      \"from\": \"@concordialang-healer/heuristics-web\"\n    },\n    {\n      \"name\": \"by-attributes\",\n      \"from\": \"@concordialang-healer/heuristics-web\"\n    },\n    {\n      \"name\": \"by-tag\",\n      \"from\": \"@concordialang-healer/heuristics-web\"\n    },\n    {\n      \"name\": \"by-xpath\",\n      \"from\": \"@concordialang-healer/heuristics-web\"\n    },\n    {\n      \"name\": \"by-text\",\n      \"from\": \"@concordialang-healer/heuristics-web\"\n    }\n  ]\n}\n```\n\n## Heurísticas\n\n| Nome            | Descrição                                                          |\n| --------------- | ------------------------------------------------------------------ |\n| `by-id`         | Busca pela propriedade `id`                                        |\n| `by-classes`    | Busca por cada uma das propriedades `class` do elemento            |\n| `by-attributes` | Busca pelos demais atributos além de `id` e `class`                |\n| `by-tag`        | Busca pela `tag`                                                   |\n| `by-xpath`      | Busca pelo `xpath` (localização)                                   |\n| `by-text`       | Busca elementos com a mesma tag e conteúdo textual (`textContent`) |\n\nOs pesos distrbuidos pelas heurísticas aos elementos são calculados com a base na quantidade de elementos encontrados:\n\n```math\n1 / quantidade_de_elementos_encontrados\n```\n\n### Exemplo\n\nSupondo que estamos procurando o elemento `username` na interface abaixo\n\n```html\n<body>\n  <h1>Exemplo</h1>\n  <form>\n    <input name=\"username\" id=\"username\" />\n    <input name=\"password\" id=\"password\" />\n    <button>ok</button>\n  </form>\n</body>\n```\n\n#### Heurística `by-tag`\n\n- Procura pelos elementos com a tag `input` na interface\n\n```js\nquerySelectorAll('input');\n```\n\n- Dois elementos serão encontrados\n- Atribui peso `0.5` para cada um deles\n","readmeFilename":"README.md"}