GroupOn SDET phone screen

status - 2 yrs exp working as SW Test Automation, MS CS
position - SDET at Groupon
location - Chicago, IL

hour technical phone screen -
Questions related to work experience, reasons for using tools and frameworks on current experience

Technical questions-

  1. Why would you prefer Protractor over Selenium WebDriver for web application test?
  • Protractor has APIs which are better suited to test the AngularJS web applications. It provides ability to locate the elements on the web application using model, controller etc.
  1. Given a string (e.g "this is first sentence. this is second. And this is third"). Write a method that will return me array of hashmaps such that each hashmap in array will be 1 sentence and every hashMap will contain (word number, word) of that sentence.
  • solution:
	String[] sentences = str.split(".");
	HashMap<Integer, String>[] hashMap = new HashMap()[sentences.length];
	for(i=0 to sentences.length) {
	String[] words = sentences[i].split(" ");
	HashMap<Integer, String> map = new HashMap();
		for(j=1 to words.length) {
			map.put(j, words[j-1]);
		}
		hashMap[i] = map;
	}
	return hashMap;
	```
	
Comments (2)