Back to project page andro_auto_framework.
The source code is released under:
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCT...
If you think the Android project andro_auto_framework listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.imaginea.botbot.keywords; /*from w w w .ja v a 2s.c o m*/ import java.util.ArrayList; import java.util.List; import junit.framework.Assert; import org.imaginea.botbot.common.Command; import org.imaginea.botbot.common.Prefrences; public class KeywordCaller { private List<BaseKeywordDefinitions> keywordDefinitions = new ArrayList<BaseKeywordDefinitions>(); IKeywords kd; private String framework; Prefrences prefrences; private void initializeDefinitions(){ framework = "#FRAMEWORK#"; prefrences.setFramework(framework); keywordDefinitions.add(new NativeDriverKeywordDefinitions(prefrences)); keywordDefinitions.add(new RobotiumKeywordDefinition(prefrences)); keywordDefinitions.add(new DynamicExecution(prefrences)); } public KeywordCaller(Prefrences prefrences){ this.prefrences=prefrences; System.out.println(prefrences.getExecutionContext().getClass().getName()); initializeDefinitions(); } public void execute(Command command){ boolean found=false; for(BaseKeywordDefinitions definition:keywordDefinitions){ if(definition.methodSUpported(command)){ definition.execute(command); found=true; break; } } Assert.assertTrue("Unable to find definition for the command: "+command.getName(),found); } }