# Please add ids to perspective components for writing tests

**URL:** <https://forum.inductiveautomation.com/t/please-add-ids-to-perspective-components-for-writing-tests/46949>\
**Category:** Ignition\
**Created:** [May 20, 2021, 5:54pm UTC](https://forum.inductiveautomation.com/t/please-add-ids-to-perspective-components-for-writing-tests/46949 "2021-05-20T17:54:53Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 20, 2021, 7:47pm UTC](https://forum.inductiveautomation.com/t/please-add-ids-to-perspective-components-for-writing-tests/46949/16 "2021-08-20T19:47:07Z")

</div>

Actually, Cody’s script above can be adapted to be a bit less fragile without too much trouble.

```auto
client = __client
mounts = __client.mounts
mainViewId = `${mounts.center.viewPath}@${mounts.center.code}`
mainView = client.page.views.get(mainViewId)
mainView.custom.read("key") // or readArray, readDataset, etc

```

Still somewhat fragile, but not _as_ bad. `PropertyTree` on the frontend has various methods to read values from the model as different types. Custom properties _are_ currently ‘synced’ to the frontend, though as Cody mentioned, that default may be changed in the future, since outside of automated testing there’s little point in synchronizing custom properties to the frontend.

---

_[View the full topic](https://forum.inductiveautomation.com/t/please-add-ids-to-perspective-components-for-writing-tests/46949)._
