For your first question: ATS makes use of the "mx-name-<widget name>" CSS class names generated by the platform and assigned to the widgets in your app. You can modify the widget name in the widget’s properties in the modeler. With the ATS helper, which is a browser-based tool included in ATS, you can easily show the widget name of each stand-alone widget in your app. As long as your widget keeps the same name you do not have to create new test cases if your UI changes, because ATS can still recognize the same mx-name of that widget.
For your second question: Test cases are not compiled into code but interpreted at runtime. Therefore, they can only be edited in ATS. ATS is really meant as an easier to work with tool than something like Selenium, because you do not need any coding knowledge. ATS is based on keyword-driven-testing, so by putting keywords together you create a test case. These keywords do a lot of extra work for you, like doing a visibility check and checking whether all microflows are finished before ATS will execute the next keyword.