# Cant accept the cookies

**URL:** <https://forum.robotframework.org/t/cant-accept-the-cookies/9734>\
**Category:** Uncategorized\
**Created:** [16 June 2026 14:58 UTC](https://forum.robotframework.org/t/cant-accept-the-cookies/9734 "2026-06-16T14:58:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonahockey](https://avatars.discourse-cdn.com/v4/letter/j/6bbea6/32.png) [@jonahockey](https://forum.robotframework.org/u/jonahockey)\
**Post date:** [16 June 2026 14:58 UTC](https://forum.robotframework.org/t/cant-accept-the-cookies/9734/1 "2026-06-16T14:58:31Z")

</div>

Hi there,

I’m trying to accept the cookies of this website [marktplaats.nl](https://marktplaats.nl). But I can’t get it to click on the accepteren button. Anyone some idea’s?

Trying to get the xpath with some tools also doesn’t work and also somethings like: Click Element //button[contains(name,‘Accepteren’)] didn’t work.

Please help.

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [16 June 2026 15:57 UTC](https://forum.robotframework.org/t/cant-accept-the-cookies/9734/2 "2026-06-16T15:57:33Z")

</div>

> [@jonahockey](#):
>
> Click Element //button[contains(name,‘Accepteren’)] didn’t work.

Welcome to our Forum.

We have two libraries for Web testing, SeleniumLibrary and Browser.  
It is better to name which library you are using, or set the topic to the correct category.

Other thing that is not helpful, is the `didn’t work.`. Probably there is an error message, or something in the logs, and you should be able to better describe the behaviour.

---

<div class="post-metadata">

**Author:** ![jonahockey](https://avatars.discourse-cdn.com/v4/letter/j/6bbea6/32.png) [@jonahockey](https://forum.robotframework.org/u/jonahockey)\
**Post date:** [16 June 2026 17:37 UTC](https://forum.robotframework.org/t/cant-accept-the-cookies/9734/3 "2026-06-16T17:37:39Z")

</div>

Hi @HelioGuilherme66,

Thank you for the questions and remarks.  
I tried both Browser and SeleniumLibrary.  
With Browser I get:

![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/optimized/2X/4/4c9693ed7c51074aed2ab383bf77fa83249fc5a3_2_690x28.png)

With SeleniumLibrary:  
Element ‘//button[contains(name,‘Accepteren’)]’ not visible after 10 seconds.

I can’t find the right xpath and the chrome extension xpath tools can’t find the element.

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [16 June 2026 17:47 UTC](https://forum.robotframework.org/t/cant-accept-the-cookies/9734/4 "2026-06-16T17:47:39Z")

</div>

A common situation is the element being inside an **iframe** , which is most probable because is a popup outside the main page context.

In Chrome DevTools, you can do Ctrl-F to find a XPATH locator, or inspect the element and see if the parents are inside an iframe.

---

<div class="post-metadata">

**Author:** ![Remppa](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/remppa/32/5133_2.png) [@Remppa](https://forum.robotframework.org/u/Remppa)\
**Post date:** [17 June 2026 06:06 UTC](https://forum.robotframework.org/t/cant-accept-the-cookies/9734/5 "2026-06-17T06:06:16Z")

</div>

iframe \>\> //button[@aria-label=“Accepteren”]  
or  
iframe \>\> //button[@title=“Accepteren”]

should work since in iframe.

---

<div class="post-metadata">

**Author:** ![RysZ](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/rysz/32/4570_2.png) [@RysZ](https://forum.robotframework.org/u/RysZ)\
**Post date:** [18 June 2026 08:13 UTC](https://forum.robotframework.org/t/cant-accept-the-cookies/9734/6 "2026-06-18T08:13:50Z")

</div>

Hi,

this iframe selector works for me:

Click [title=“SP Consent Message”] \>\>\> [title=“Accepteren”]

BR

EDIT. Used Browser library OFC.
