I'm having this strange error (sometimes works sometimes does not):

> 
> no such element: Unable to locate element:
> {"method":"xpath","selector":"//\*[@id="card-id-oidc-i"]/a"}
> 
> 
> 

My button has this:

```
<a href="/auth/realms/Global-Realm/broker/id-oidc-i/login?client_id=web&amp;tab_id=Doz54nelUC0&amp;session_code=gwAePmGfpQ2hBLommJO7Rswc1gNkB90Ctc4">
                                <div style="width:100%;height: 40px;">
                                <span class="arrow arrow-bar is-right"></span>
                                </div>
                                <div class="image" style="background-repeat: no-repeat;margin:auto; width:115px;height:120px"></div>
                                <div style="margin-top: 10px;min-width:170px">
                                    <h4 style="text-align:center;"><b>log in</b></h4> 
                                </div>
                                </a>

```

It's XPATH is:

```
//*[@id="card-id-oidc-i"]/a

```

I did this:

```
driver.findElement(By.xpath("//*[@id=\"card-id-oidc-i\"]/a")).click();

```

It is strange because sometimes works just fine but sometimes it fails.

Why?