Say that I am testing a GET api. The get api fetches data which is stored due to user actions on a web UI. The data cannot be setup by simply looking at the network inspector calls for these actions and then repeating the calls. Ideally, I'd like to use apis to setup the data, but that is not possible now. So, I was thinking of putting UI automation code in my api automation code just to setup the data. Is this acceptable ? If not, then why ?
I don't see any challenges other than html locators getting changed, which would be very rarely for this web app.