# I can't interact with the chatbot UI

**URL:** <https://forum.robotframework.org/t/i-cant-interact-with-the-chatbot-ui/6694>\
**Category:** Robot Framework\
**Created:** [21 January 2024 10:34 UTC](https://forum.robotframework.org/t/i-cant-interact-with-the-chatbot-ui/6694 "2024-01-21T10:34:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brudex](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/brudex/32/3320_2.png) [@Brudex](https://forum.robotframework.org/u/Brudex)\
**Post date:** [21 January 2024 10:34 UTC](https://forum.robotframework.org/t/i-cant-interact-with-the-chatbot-ui/6694/1 "2024-01-21T10:34:23Z")

</div>

I can’t find the chatbot icon within a page to interact with, it is a floating icon, it has an ID, however the robot and selenium library cannot find the elements. The test page is a page that all it has is an icon that accesses the chatbot and I cannot interact with it. It is “similar” to the chatbot on this page [https://www.geru.com.br/](https://www.geru.com.br/)

---

<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:** [21 January 2024 11:52 UTC](https://forum.robotframework.org/t/i-cant-interact-with-the-chatbot-ui/6694/2 "2024-01-21T11:52:12Z")

</div>

Hi Bruno,

I gather the chat bot button you want is identified with `id="salesforce-chat-trigger"`?

I did a quit test with SeleniumLibrary like this:

```python
***Settings***
Library SeleniumLibrary

***Variables***
${URL} https://www.geru.com.br/

***Test Cases***
Geru Chat
	Open Browser ${URL} chrome
	Click Element css=#salesforce-chat-trigger

```

But found i got a prompt to confirm I’m human:  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/3/3b6e85dcd54a38c3d8a737cc414dfdf15d9842a4.png)

So this is your first potential issue, are you getting that too?

I then used [Dialogs Library](https://robotframework.org/robotframework/latest/libraries/Dialogs.html) to get passed that, like this:

```python
Library SeleniumLibrary
Library Dialogs

***Variables***
${URL} https://www.geru.com.br/

***Test Cases***
Geru Chat
	Open Browser ${URL} chrome
	Execute Manual Step Not a Robot
	Click Element css=#salesforce-chat-trigger

```

The next issue I encountered was the cookies banner at the bottom of the page:

 ![selenium-screenshot-2](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/d/d62b18d9415dee64c0c5bf1e19d6c13592911bac.jpeg)

So run again, while on `Execute Manual Step` I cleared the human verification and also cleared the banners at the top and bottom of the page and was able to click the chat button, but there was quite delay before the chat window opened so I got this:

 ![selenium-screenshot-4](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/5/5ec2acfaecbb070fd89822271e6572a8aab105e6.jpeg)

Next I added a wait for the chat window to open, so now my script looks like:

```python
***Settings***
Library SeleniumLibrary
Library Dialogs

***Variables***
${URL} https://www.geru.com.br/

***Test Cases***
Geru Chat
	Open Browser ${URL} chrome
	Execute Manual Step Not a Robot
	Click Element css=#salesforce-chat-trigger
	Wait Until Element Is Visible css=.chatHeaderBranding 60
	Capture Page Screenshot

```

And I get this:

 ![selenium-screenshot-6](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/4/40d04cb87aa555b36c9e7ab42253cfc4e8f8e06b.jpeg)

As you can see it was nearly 8 seconds for the chat window to pop up and it’s not even fully loaded yet, FYI - the default timeout in SeleniumLibrary is 5 seconds

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/a/a41988f2987664774e3053ab148f6c9a3896ae83.png)

You should be able to automate clearing the banners, though the confirm I’m human prompt is usually not automate-able by design, but hopefully that’s disabled in your test environment?

Hopefully this will help give you the start you need,

Dave.
