Where to find domId´s in view.json

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?

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

1 Like

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.

shows up for me just fine
image
image

1 Like

image
image
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++

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

1 Like

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

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

Use a recursive grep to look for "button12345".

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

Not true, but whatever.

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

No, I´m searching all views.
image

The alternative in Windows would be:

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

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

1 Like