How can automation be done from Sprint1 in agile environment, since there is no UI from which we can identify objects with different locators?
It is notoriously hard to automate a UI that does not exist yet. In theory, if you and the UI designer work closely enough, you may be able to at least spec out your tests before the UI exists. I have never seen this happen in practice.
There are other kinds of automation, though. For example, you could write automated tests against APIs, or automation for installing software, or automation for creating test data.
Some of the things you can do:
- create a documentation page for the project with best practices ( automation flow, code review standards, automation framework structure, coding best practices, CI process, execution and debugging )
- setup the automation repository
- setup for how the data is generated
- review and add improvements in the automation framework
- create jobs for CI if you plan to use it this way
- you can start with a mapping of the objects if you have some documentation(like wireframes or acceptance criteria)
- you can even start to define tests if you have any kind of documentation
- you can start plan the automation and think outside-in, start high level and set a base to build upon
- estimate if you will have any additional costs that the management team should know ( mailing service, execution of the automation suite using services that provide cloud solutions like SauceLabs, BrowserStack, AWS)
For example if you are using a framework with support for BDD then you can define your scenarios at first and start implementation later.