package helpers

import (
	"fmt"
	"os"
	"os/exec"

	"github.com/onsi/ginkgo"
	"github.com/sclevine/agouti"
)

func AgoutiDriver() *agouti.WebDriver {
	if _, err := exec.LookPath("phantomjs"); err == nil && os.Getenv("FORCE_SELENIUM") != "true" {
		fmt.Fprintln(ginkgo.GinkgoWriter, "WARNING: using phantomjs, which is flaky in CI, but is more convenient during development")
		return agouti.PhantomJS()
	} else {
		return agouti.Selenium(agouti.Browser("firefox"))
	}
}

package helpers

import "github.com/sclevine/agouti"

func AgoutiDriver() *agouti.WebDriver {
	return agouti.PhantomJS()
}

--- 
+++ 
@@ -1,7 +1,19 @@
 package helpers
 
-import "github.com/sclevine/agouti"
+import (
+	"fmt"
+	"os"
+	"os/exec"
+
+	"github.com/onsi/ginkgo"
+	"github.com/sclevine/agouti"
+)
 
 func AgoutiDriver() *agouti.WebDriver {
-	return agouti.PhantomJS()
+	if _, err := exec.LookPath("phantomjs"); err == nil && os.Getenv("FORCE_SELENIUM") != "true" {
+		fmt.Fprintln(ginkgo.GinkgoWriter, "WARNING: using phantomjs, which is flaky in CI, but is more convenient during development")
+		return agouti.PhantomJS()
+	} else {
+		return agouti.Selenium(agouti.Browser("firefox"))
+	}
 }
Revert "never use selenium ever"

This reverts commit 2b17348c5eb516d3d5b340c8fd28cc065594d42a.
