本文整理汇总了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..."))