GEB Common error Analysis (i): at grammar check

Source: Internet
Author: User

When using GEB for automated testing, jumping to a new page often uses the at syntax, for example in a Schooladdpage.groovy:
Class Schooladdpage extends page{
static at = {
$ ('. Box-title '). Text () = = "Add English World"
}
}
The following error message often appears when you run the program, as detailed below. Do not doubt if you choose the wrong object or error, it may be that the program runs too fast. Can be modified into:
static at = {
WaitFor () {$ ('. Box-title '). Text () = = "Add English World"}
}
Maybe we can solve the problem.

Geb.error.UnexpectedPageException:At Checker page verification failed for page page. Schooladdpage
At Geb.navigator.NonEmptyNavigator.click (nonemptynavigator.groovy:492)
At Geb.navigator.NonEmptyNavigator.click (nonemptynavigator.groovy:469)
At Geb.content.TemplateDerivedPageContent.click (templatederivedpagecontent.groovy:71)
Schoolmanagespec.to Add a school page (schoolmanagespec.groovy:59)
Caused By:assertion failed:


$ ('. Box-title '). Text () = = "Add English World"
|      | |
[] Null False


At page. Schooladdpage._clinit__closure2 (Schooladdpage.groovy:8)
At Cn.com.nd.school.page.schooladdpage._clinit__closure2 (Schooladdpage.groovy)
At Geb. Page.verifythispageatonly (page.groovy:228)
At Geb. Page.verifyat (page.groovy:182)
At Geb. Browser.methodmissing (browser.groovy:206)
At Geb.navigator.NonEmptyNavigator.click (nonemptynavigator.groovy:481)
... 3 more




GEB Common error Analysis (i): at grammar check

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.