package com.autonomy.abc.selenium.search;

import com.autonomy.abc.selenium.actions.ActionFactory;
import com.autonomy.abc.selenium.config.Application;
import com.autonomy.abc.selenium.page.ElementFactory;

public class SearchActionFactory extends ActionFactory {
    public SearchActionFactory(Application application, ElementFactory elementFactory) {
        super(application, elementFactory);
    }

    public Search makeSearch(String searchTerm) {
        return new Search(getApplication().createAppBody(getDriver()), getElementFactory(), searchTerm);
    }
}

@@ -145,16 +145,63 @@
 cation;%0A
+import com.autonomy.abc.selenium.page.AppBody;%0A
 import c
@@ -304,16 +304,76 @@
 ctory %7B%0A
+    // TODO: does this go stale?%0A    private AppBody body;%0A%0A
     publ
@@ -497,16 +497,71 @@
 ctory);%0A
+        body = application.createAppBody(getDriver());%0A
     %7D%0A%0A 
@@ -639,51 +639,12 @@
 rch(
-getApplication().createAppBody(getDriver())
+body
 , ge

Refactor SearchActionFactory to use a single AppBody (otherwise cannot makeSearch when on Find)