# Selecting mat-accordion and mat-expansion-panel-header in roboticframework

**URL:** <https://forum.robotframework.org/t/selecting-mat-accordion-and-mat-expansion-panel-header-in-roboticframework/7146>\
**Category:** Robot Framework\
**Created:** [9 April 2024 09:43 UTC](https://forum.robotframework.org/t/selecting-mat-accordion-and-mat-expansion-panel-header-in-roboticframework/7146 "2024-04-09T09:43:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lavanya4964](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@lavanya4964](https://forum.robotframework.org/u/lavanya4964)\
**Post date:** [9 April 2024 09:43 UTC](https://forum.robotframework.org/t/selecting-mat-accordion-and-mat-expansion-panel-header-in-roboticframework/7146/1 "2024-04-09T09:43:14Z")

</div>

If documentation available for this please share.  
I need to select the element, then i have to click the checkboxes like below.  
This is bit confusing, I will try to elaborate.  
need to select checkbox, inside this check box again have to select checkboxes  
step 1: select first one **custody sub accounts**  
step 2: it will display the checkbox options then have to select/unselect based on requirement  
like this i have to select as per requirement.

 ![checklist](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/4/4e2d240a1639145d1458778f73ed56f672dc9969.png)

**All the check options inspect with mat-accordion**

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

**inspect for first check box which is in mat-expansion-panel**

 ![expansion panel](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/e/ed91e48357e04355717875193720e98e75d350a1.png)

**after selecting option**

 ![insidelist](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/2/27120f9da7fac5ff065a363866be5833f54af93d.png)

**Testda1234\_GMRdata code snippet**

 ![testdatasnippet](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/7/74f5723dcbd23040fa7b28e64b602eb8bc39daf2.png)

 ![valuesnippet](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/3/302eba6df4f6179107ffcf072b0d6b1fb02e21d1.png)

Thanks in advance !!

---

<div class="post-metadata">

**Author:** ![lavanya4964](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@lavanya4964](https://forum.robotframework.org/u/lavanya4964)\
**Post date:** [9 April 2024 09:51 UTC](https://forum.robotframework.org/t/selecting-mat-accordion-and-mat-expansion-panel-header-in-roboticframework/7146/2 "2024-04-09T09:51:01Z")

</div>

using Click element i am able select the value but I am reading data from csv file,

---

<div class="post-metadata">

**Author:** ![lavanya4964](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@lavanya4964](https://forum.robotframework.org/u/lavanya4964)\
**Post date:** [11 April 2024 05:29 UTC](https://forum.robotframework.org/t/selecting-mat-accordion-and-mat-expansion-panel-header-in-roboticframework/7146/3 "2024-04-11T05:29:56Z")

</div>

Hi,  
can anyone help me with this.

---

<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:** [11 April 2024 10:27 UTC](https://forum.robotframework.org/t/selecting-mat-accordion-and-mat-expansion-panel-header-in-roboticframework/7146/4 "2024-04-11T10:27:21Z")

</div>

Hi Lavanya,

The approach to clicking this element is basically the same as I’ve mentioned in your previous threads, I suggest you take the time to study the [XPath Tutorial](https://www.w3schools.com/xml/xpath_intro.asp) and learn how to write xpaths yourself.

As for the second part:

> reading data from csv file

You didn’t mention how you are reading the data from a csv file, there are several ways you can do this in robot framework so this question is far too generic for anyone to know how to help you. perhaps show your robot test case in context to your question?

As a general guide:  
When you read the data from a csv file, the data should be in several variables or in a data structure like a list or dictionary, either way this data variable can be used anywhere withing robot framework, in your case within a selector like an xpath, robot framework will see the variable in the xpath, convert the variable to it’s value and then pass the xpath to the keyword.

Hopefully that helps,

Dave.
