# SeleniumLibrary

**URL:** <https://forum.robotframework.org/t/seleniumlibrary/2206>\
**Category:** SeleniumLibrary\
**Created:** [29 July 2021 21:58 UTC](https://forum.robotframework.org/t/seleniumlibrary/2206 "2021-07-29T21:58:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmartins](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@jmartins](https://forum.robotframework.org/u/jmartins)\
**Post date:** [29 July 2021 21:58 UTC](https://forum.robotframework.org/t/seleniumlibrary/2206/1 "2021-07-29T21:58:46Z")

</div>

Boa tarde pessoal, tudo bem? Estou nesse processo de automação com o robot e gostaria de uma ajuda, se puderem. Eu preciso que quando acesse em uma pagina, clique no título. Conforme anexo, não tem ID e nome, estão copie o xpath:

Click Element xpath=//\*[@id=“root”]/div/ion-app/ion-router-outlet/div/ion-content/div[1]/div[2]/p

 ![selenium](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/1X/2506d36e6f5551f396b19c719a94f6a32ed842a3.jpeg)

Porém não funcinou, falhou na execução.  
Vocês teriam alguma ideia do que pode ser?

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [30 July 2021 02:25 UTC](https://forum.robotframework.org/t/seleniumlibrary/2206/2 "2021-07-30T02:25:14Z")

</div>

Hi Janaina,

Sorry I don’t speak Portuguese, but will try to help.

- That xpath does not match your screenshot
- `Click Element xpath=//*[@id=“root”]` should be `Click Element xpath://*[@id=“root”]` or `Click Element //*[@id=“root”]`

Based on the screenshot the xpath should be `//div[@id=“root”]/div/div[2]`

but if you want a more reliable method of using an xpath I would suggest you try something like this `//*[@id=“root”]//div[text()="Serviços"]` then you can put it into a variable like this

```python
${title}= Serviços
Click Element //*[@id=“root”]//div[text()="${title}"]

```

Then you just change ${title} for each page.

Hope this helps,

Dave.
