below is the html code,

```
<div class="StyledCard">
    <div class="CardHeader">
        <div class ="CardHeaderLeft">
            <div class="CardTitle">
                Name1
            </div>
        </div>
        <div class="CardHeaderRight">
            <button type="button" class="IconButton">
                <svg class="Icon/>
            </button>
        </div>
    </div>
</div>
<div class="StyledCard">
    <div class="CardHeader">
        <div class ="CardHeaderLeft">
            <div class="CardTitle">
                Name2
            </div>
        </div>
        <div class="CardHeaderRight">
            <button type="button" class="IconButton">
                <svg class="Icon/>
            </button>
        </div>
    </div>
</div>

```

Now i want to click the svg from the div with content name1. how can i do it?

i have tried to use

```
cy.get('div[class*="CardTitle"]')
    .contains('Name1')

```

this gives the div with content Name1 but how do i click the icon that is contained in its parent div CardHeader. could someone help me with this thanks.