I want to access to my page http:localhost:8080/ppf/fact/mmapay after logging in and displayed the index page.
I use given -via -expect - at , But it seems doesn't redirect me to the correct page..
Please help me to do that
Below the test code
import geb.spock.GebReportingSpec
import pages.*
import spock.lang.Stepwise
@Stepwise
class FactControllerSpec extends GebReportingSpec {
def "redirecton vers la methode fact"() {
given:
via TableauBordPage
expect:
at FactPage
}
}
Below the GEBCONFIG
environments {
chrome { driver = { new ChromeDriver() } }
System.setProperty("webdriver.firefox.bin", "C:/Program Files (x86)/Mozilla Firefox/firefox.exe")
driver = {
FirefoxProfile profile = new FirefoxProfile()
profile.setPreference("intl.accept_languages", "en-us")
def driverInstance = new FirefoxDriver(profile)
driverInstance.manage().window().maximize()
driverInstance
}
baseUrl = "http://localhost:8080/ppf/"
}
And the desciption page who to redirect
package pages
import geb.Page
class FactPage extends Page {
static url = "fact/mmapay"
static at = { title == "[Paynum] Paiement en ligne de votre facture" }
static content = {
codeFactureField { $("input", name: "code") }
nomField { $("input", name: "nom") }
prenomField { $("input", name: "prenom") }
rechercheCodeFactureButton { $("button", type: "submit") }
aurevoirButton1 { $("a", text: "Abandonner") }
rechercheFactureButton { $("button", type: "submit") }
aurevoirButton2 { $("a", text: "Abandonner") }
}
}To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/6d6f9c66-6d4a-4ee5-84cb-3da8fbc0cd89%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.