{"id":15144397,"url":"https://github.com/welli7ngton/robotframework-tutorial","last_synced_at":"2026-01-18T23:34:16.991Z","repository":{"id":242159115,"uuid":"808837646","full_name":"welli7ngton/robotframework-tutorial","owner":"welli7ngton","description":"Um repositório dedicado ao tutorial da ferramenta de RPA robotframework.","archived":false,"fork":false,"pushed_at":"2024-06-11T17:36:18.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T17:33:50.181Z","etag":null,"topics":["api-testing","python","robotframework","rpa","tests"],"latest_commit_sha":null,"homepage":"","language":"RobotFramework","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/welli7ngton.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-01T00:00:24.000Z","updated_at":"2024-06-11T17:36:21.000Z","dependencies_parsed_at":"2024-10-09T23:40:41.971Z","dependency_job_id":"0aa2b90e-5655-422a-8e88-c0dd823056c1","html_url":"https://github.com/welli7ngton/robotframework-tutorial","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"0f84cc9fe90eca2bcfba92fdfab83e481b382559"},"previous_names":["welli7ngton/robotframework-turorial"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/welli7ngton/robotframework-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welli7ngton%2Frobotframework-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welli7ngton%2Frobotframework-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welli7ngton%2Frobotframework-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welli7ngton%2Frobotframework-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/welli7ngton","download_url":"https://codeload.github.com/welli7ngton/robotframework-tutorial/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welli7ngton%2Frobotframework-tutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28553537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T23:10:22.888Z","status":"ssl_error","status_checked_at":"2026-01-18T23:07:19.656Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-testing","python","robotframework","rpa","tests"],"created_at":"2024-09-26T10:41:07.909Z","updated_at":"2026-01-18T23:34:16.977Z","avatar_url":"https://github.com/welli7ngton.png","language":"RobotFramework","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Guia de Estrutura de Escrita de XPath para Automação com Robot Framework\n\n## Introdução\n\nEste guia fornece uma estrutura detalhada sobre como escrever expressões XPath eficazes para automação de testes com o Robot Framework. XPath é uma linguagem usada para navegar por elementos e atributos em um documento XML ou HTML, essencial para localizar elementos em páginas web.\n\n## Índice\n\n- [Introdução ao XPath](#introdução-ao-xpath)\n- [Estrutura Básica de um XPath](#estrutura-básica-de-um-xpath)\n- [Seletores Comuns](#seletores-comuns)\n  - [Selecionar por Tag](#selecionar-por-tag)\n  - [Selecionar por Atributo](#selecionar-por-atributo)\n  - [Selecionar por Conteúdo de Texto](#selecionar-por-conteúdo-de-texto)\n  - [Uso de Funções](#uso-de-funções)\n- [Combinação de Seletores](#combinação-de-seletores)\n  - [Múltiplos Condicionais](#múltiplos-condicionais)\n  - [Hierarquia de Elementos](#hierarquia-de-elementos)\n- [Exemplos Práticos no Robot Framework](#exemplos-práticos-no-robot-framework)\n- [Dicas e Boas Práticas](#dicas-e-boas-práticas)\n- [Ferramentas Úteis](#ferramentas-úteis)\n- [Conclusão](#conclusão)\n\n## Introdução ao XPath\n\nXPath permite selecionar elementos em um documento XML ou HTML com base em diversos critérios. Existem dois tipos principais de seletores XPath:\n- **XPath Absoluto**: Navega pela hierarquia completa do documento a partir da raiz.\n- **XPath Relativo**: Navega a partir do nó atual ou de um nó específico, utilizando seletores mais flexíveis.\n\n## Estrutura Básica de um XPath\n\n### XPath Absoluto\n```xpath```\n/html/body/div[1]/div[2]/a\n\n### XPath Relativo\n```xpath```\n//div[@class='example']/a\n\n## Seletores Comuns\n### Selecionar por Tag\n```xpath```\n//tagname\n\n```xpath```\n//button\n### Selecionar por Atributo\n```xpath```\n//tagname[@attribute='value']\n\n```xpath```\n//input[@id='username']\n### Selecionar por Conteúdo de Texto\n```xpath```\n//tagname[text()='value']\n\n```xpath```\n//button[text()='Submit']\n## Uso de Funções\ncontains()\n### Seleciona elementos que contêm um determinado valor.\n\n```xpath```\n//tagname[contains(@attribute, 'value')]\n\n```xpath```\n//a[contains(@href, 'login')]\nstarts-with()\n### Seleciona elementos cujo valor de atributo começa com um determinado valor.\n\n```xpath```\n//tagname[starts-with(@attribute, 'value')]\n\n```xpath```\n//div[starts-with(@class, 'header')]\n## Combinação de Seletores\n### Múltiplos Condicionais\n# Você pode combinar várias condições usando and e or.\n\n```xpath```\n//tagname[@attribute1='value1' and @attribute2='value2']\n\n```xpath```\n//input[@type='text' and @name='username']\nHierarquia de Elementos\n# Você pode navegar através da hierarquia de elementos.\n\n```xpath```\n//parentTag/childTag\n\n```xpath```\n//div/form/input\n## Exemplos Práticos no Robot Framework\nConfigurando o Ambiente\nNo arquivo de teste do Robot Framework (.robot), importe a biblioteca SeleniumLibrary para usar seletores XPath.\n\n```robot\n*** Settings ***\nLibrary    SeleniumLibrary\n\n*** Variables ***\n${URL}    https://example.com\n\n*** Test Cases ***\nTest Example\n    Open Browser    ${URL}    Chrome\n    # Localizar elemento por XPath absoluto\n    Click Element    /html/body/div[1]/div[2]/a\n    # Localizar elemento por XPath relativo\n    Input Text    //input[@id='username']    myusername\n    Click Button    //button[text()='Submit']\n    Close Browser\n```\n### Dicas e Boas Práticas:\n- Prefira XPath Relativo: Eles são menos propensos a quebrar quando a estrutura da página muda.\n- Use Funções XPath: Funções como contains() e starts-with() tornam os seletores mais flexíveis.\n- Teste Seus Seletores: Utilize ferramentas de desenvolvedor nos navegadores (como o Chrome DevTools) para testar seus seletores XPath antes de usá-los em scripts de automação.\n- Mantenha a Simplicidade: Escreva seletores simples e claros para facilitar a manutenção do código.\n### Ferramentas Úteis\n- Chrome DevTools: Inspecione elementos e teste XPath diretamente no console.\n- Firefox Developer Tools: Oferece ferramentas semelhantes ao Chrome DevTools.\n- XPath Helper: Extensão para navegadores que ajuda a criar e testar expressões XPath.\n### Conclusão\n- Compreender e utilizar expressões XPath eficazes é fundamental para a automação de testes com o Robot Framework. Este guia fornece uma base sólida para começar a escrever e otimizar seletores XPath, permitindo a criação de scripts de automação mais robustos e resilientes.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelli7ngton%2Frobotframework-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwelli7ngton%2Frobotframework-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelli7ngton%2Frobotframework-tutorial/lists"}