Groovy web console

subscribe to the feed Subscribe
to this
site

rrre

Published 2 months ago by Anna
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
package ContactUsPage

import geb.spock.GebSpec
import groovy.util.logging.Log
import pages.ContactUs
import spock.lang.Stepwise

@Log
@Stepwise
class EnterToPageTest extends GebSpec {

    def cleanupSpec() {
        browser.close()
    }

    def "Should enter to page"() {
        expect:
        to ContactUs
    }



package pages

import geb.Page

class ContactUs extends Page {
    static url =  + "/index.php?controller=contact"
    static at = { waitFor(60) { !header.isEmpty() } }


    static content = {
        header { $('div[class="page-heading bottom-indent"] h1').$('h1', text: 'Customer service - Contact us') }

    }
}