Cognizant interview question

selenium snippets, syntax, java codes