AlertButton has no id attribute

Hi!
Why does AlertButton does NOT have an id attribute, while AlertInput does have it?

I am trying to improve test automation of my project and use well defined IDs. Works like a charme for the AlertInput, but for the buttons, I cant see a way to define the ID of the buttons. I use a special cssClass as ugly workaround.

Any idea?

1 Like

Hello, share sample of your code, so people can give you answer.

I have wondered the same for a while now, and haven’t been able to come up with a good solution.

I think there’s no need for sample code, since it is clearly “specified” in the Alert documentation

There you can see the Input options include an “id”, but Button options do not. :confused:

https://github.com/ionic-team/ionic/pull/18992