# Where to find domId´s in view.json

**URL:** <https://forum.inductiveautomation.com/t/where-to-find-domid-s-in-view-json/94334>\
**Category:** Automated Testing\
**Created:** [August 8, 2024, 10:55am UTC](https://forum.inductiveautomation.com/t/where-to-find-domid-s-in-view-json/94334 "2024-08-08T10:55:23Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Taha\_Al\_Dailami](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@Taha\_Al\_Dailami](https://forum.inductiveautomation.com/u/Taha_Al_Dailami)\
**Post date:** [August 8, 2024, 10:55am UTC](https://forum.inductiveautomation.com/t/where-to-find-domid-s-in-view-json/94334/1 "2024-08-08T10:55:23Z")

</div>

Hello,  
I am new to automated testing with Selenium.  
Current situation:  
My team wants to use Selenium for automated testing, but from what I've read, you need domId's.  
Since we have a fairly large project without a single domId, we tried to write a script that changes/adds the domId in the view.json.  
However, the domId could not be found in the view.json (only HTML).

Where can I find the domId?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [August 8, 2024, 11:53am UTC](https://forum.inductiveautomation.com/t/where-to-find-domid-s-in-view-json/94334/2 "2024-08-08T11:53:12Z")

</div>

They are a property in the metadata, that have to be added.

---

<div class="post-metadata">

**Author:** ![Taha\_Al\_Dailami](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@Taha\_Al\_Dailami](https://forum.inductiveautomation.com/u/Taha_Al_Dailami)\
**Post date:** [August 8, 2024, 11:55am UTC](https://forum.inductiveautomation.com/t/where-to-find-domid-s-in-view-json/94334/3 "2024-08-08T11:55:32Z")

</div>

Yes, I already added the property in the designer (under 'META') and I was able to see the domId in HTML. But later I tried to find the domId in view.json but could not find it.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [August 8, 2024, 11:58am UTC](https://forum.inductiveautomation.com/t/where-to-find-domid-s-in-view-json/94334/4 "2024-08-08T11:58:42Z")

</div>

shows up for me just fine  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/0/a0b28c556a738123234a5b945fe08a82b02429fe.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/a/aa887b5cbc7baea144f67e03dd5057f0400a0806.png)

---

<div class="post-metadata">

**Author:** ![Taha\_Al\_Dailami](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@Taha\_Al\_Dailami](https://forum.inductiveautomation.com/u/Taha_Al_Dailami)\
**Post date:** [August 8, 2024, 12:06pm UTC](https://forum.inductiveautomation.com/t/where-to-find-domid-s-in-view-json/94334/5 "2024-08-08T12:06:55Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/a/2a2b33593ceac8d7c78d9f977ba6d36a207d47b2.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/e/0ead42a044aea7a6d8a92676fc3bc6cbae4a6cfd.png)  
I´m using Ignition 8.1.42 and checked in the Designer that I assigned a domId but nothing seems to happen in the view.json  
I´m using Notepad++

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [August 8, 2024, 12:16pm UTC](https://forum.inductiveautomation.com/t/where-to-find-domid-s-in-view-json/94334/6 "2024-08-08T12:16:42Z")

</div>

Just gotta save in the designer and reopen the file, i think notepad might cache files if you dont close/open them

---

<div class="post-metadata">

**Author:** ![Taha\_Al\_Dailami](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@Taha\_Al\_Dailami](https://forum.inductiveautomation.com/u/Taha_Al_Dailami)\
**Post date:** [August 8, 2024, 12:21pm UTC](https://forum.inductiveautomation.com/t/where-to-find-domid-s-in-view-json/94334/7 "2024-08-08T12:21:49Z")

</div>

The id can be found in HTML, but not in view.json, even after closing, saving and reopening the file.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [August 8, 2024, 1:05pm UTC](https://forum.inductiveautomation.com/t/where-to-find-domid-s-in-view-json/94334/8 "2024-08-08T13:05:15Z")

</div>

Are you sure you are looking at the correct file? change a button name and see if that changes in your file

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 8, 2024, 1:07pm UTC](https://forum.inductiveautomation.com/t/where-to-find-domid-s-in-view-json/94334/9 "2024-08-08T13:07:17Z")

</div>

Use a recursive `grep` to look for "button12345".

---

<div class="post-metadata">

**Author:** ![Taha\_Al\_Dailami](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@Taha\_Al\_Dailami](https://forum.inductiveautomation.com/u/Taha_Al_Dailami)\
**Post date:** [August 8, 2024, 1:29pm UTC](https://forum.inductiveautomation.com/t/where-to-find-domid-s-in-view-json/94334/10 "2024-08-08T13:29:02Z")

</div>

Sorry, I´m using Ignition in windows, therfore I can´t use grep, but in notepad ++ there is a function to search for a string in all views in perspective, even with that I could not find it. I even tried restarting the Gateway.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/f/4f0134f1efddc52ac6323ed087a41a6525e924cd.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 8, 2024, 1:33pm UTC](https://forum.inductiveautomation.com/t/where-to-find-domid-s-in-view-json/94334/11 "2024-08-08T13:33:14Z")

</div>

> [@Taha\_Al\_Dailami](#):
>
> therfore I can´t use grep

Not true, but whatever.

> [@Taha\_Al\_Dailami](#):
>
> in all views

Are you limiting yourself to just `view.json` ? Don't.

---

<div class="post-metadata">

**Author:** ![Taha\_Al\_Dailami](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@Taha\_Al\_Dailami](https://forum.inductiveautomation.com/u/Taha_Al_Dailami)\
**Post date:** [August 8, 2024, 1:37pm UTC](https://forum.inductiveautomation.com/t/where-to-find-domid-s-in-view-json/94334/12 "2024-08-08T13:37:27Z")

</div>

No, I´m searching all views.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/b/6b6360e7254d17c5b3bd20c1fc296202012a3c13.png)

---

<div class="post-metadata">

**Author:** ![ggross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ggross/32/12668_2.png) [@ggross](https://forum.inductiveautomation.com/u/ggross)\
**Post date:** [August 9, 2024, 3:02pm UTC](https://forum.inductiveautomation.com/t/where-to-find-domid-s-in-view-json/94334/13 "2024-08-09T15:02:05Z")

</div>

> [@Taha\_Al\_Dailami](#):
>
> I´m using Ignition in windows, therfore I can´t use grep

The alternative in Windows would be:

```python
cd <Ignition Root Dir>
findstr /si "button12345" *

```

You will get items in the `.resources` folder returned, don't touch those.
