本文整理匯總了Golang中github.com/sclevine/agouti.Page.SetImplicitWait方法的典型用法代碼示例。如果您正苦於以下問題:Golang Page.SetImplicitWait方法的具體用法?Golang Page.SetImplicitWait怎麽用?Golang Page.SetImplicitWait使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/sclevine/agouti.Page
的用法示例。
在下文中一共展示了Page.SetImplicitWait方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/sclevine/agouti"
. "github.com/sclevine/agouti/matchers"
)
var _ = Describe("UserLogin", func() {
var page *agouti.Page
salutations := "Good morning at " + time.Now().String()
BeforeEach(func() {
var err error
page, err = agoutiDriver.NewPage(agouti.Browser("firefox"))
Expect(err).NotTo(HaveOccurred())
page.SetImplicitWait(10000)
})
AfterEach(func() {
Expect(page.Destroy()).To(Succeed())
})
It("should be able to add an entry", func() {
By("redirecting the user to the page", func() {
Expect(page.Navigate("http://localhost:8083/")).To(Succeed())
Expect(page).To(HaveURL("http://localhost:8083/"))
})
By("loading the page completely", func() {
Eventually(page.Find(".form-control"), "10s").Should(BeFound())
Eventually(page.Find("#redis-resp"), "10s").ShouldNot(HaveText("Loading..."))