Cognizant interview question

In Technical interview , they were basically asking to write code as I applied for automation testing.