Closed quexer closed 5 years ago
Test case below will report an error. Am I missing anything? thanks
error:
Expected success, but got an error: <*errors.errorString | 0xc0001882b0>: { s: "failed to navigate: request unsuccessful: invalid session id", } failed to navigate: request unsuccessful: invalid session id
suite_test.go
package admin_test import ( "testing" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/sclevine/agouti" ) func TestAdmin(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "Admin Suite") } var agoutiDriver *agouti.WebDriver var _ = BeforeSuite(func() { //agoutiDriver = agouti.PhantomJS() //success agoutiDriver = agouti.ChromeDriver() // fail Expect(agoutiDriver.Start()).To(Succeed()) }) var _ = AfterSuite(func() { Expect(agoutiDriver.Stop()).To(Succeed()) }) var _ = Describe("Admin Home", func() { var page *agouti.Page BeforeEach(func() { var err error page, err = agoutiDriver.NewPage() Expect(err).NotTo(HaveOccurred()) }) AfterEach(func() { Expect(page.Destroy()).To(Succeed()) }) It("home", func() { Expect(page.Navigate("http://127.0.0.1:5000")).To(Succeed()) }) })
@quexer Did you ever resolve this?
@williammartin
No, I gave up PhantomJs and turned to chrome
Test case below will report an error. Am I missing anything? thanks
error:
suite_test.go