Questions tagged [geb]

Geb is a library for headless web browsing on the JVM, suitable for automation and functional web testing. It uses Groovy to provide a concise story-like DSL for defining steps, and a concise and manageable DSL for defining page structure using the page object pattern.

Geb is a library for headless web browsing on the JVM, suitable for automation and functional web testing. It utilises the dynamic language features of Groovy to provide a concise story-like DSL for defining steps, and a concise and manageable DSL for defining page structure using the page object pattern.

Geb is based on the automation framework WebDriver and it can be used for scripting, scraping and general automation — or equally as a functional/web/acceptance testing solution via integration with testing frameworks such as Spock, JUnit, Selenium & TestNG.

822 questions
0
votes
2 answers

Geb how to auto populate username/password prompts

I'm using geb with spock as my acceptance test framework. Everything is going great except that there is an issue with a couple of tests where when it redirects to another website we are prompted to enter a username and password to access the site.…
James Murphy
  • 800
  • 1
  • 15
  • 29
0
votes
3 answers

Selenium 2 get all cookies on domain

All. I have problem with getting cookies on domain. i try get cookies: def "go to site"() { when: go "http://bla-bla-bla.bla" then: title == "Bla-bla-bla" // check cookies String cookies =…
plsgogame
  • 1,334
  • 15
  • 28
0
votes
2 answers

GEB test... driver callback issue

I have: • java version "1.6.0_37" • Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-10M3909) • Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode) • Grails 2.2.0 • Groovy 2.0 • GEB core 0.7.2 and all the…
Dee
  • 223
  • 5
  • 11
0
votes
3 answers

"Exception in thread "main" java.lang.ClassNotFoundException: org.codehaus.groovy.tools.GroovyStarter" error while running a simple GEB program

I have: java version "1.6.0_37" Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-10M3909) Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode) Grails 2.2.0 Groovy 2.0 GEB core 0.7.2 and all the required jars. I am trying to…
Dee
  • 223
  • 5
  • 11
0
votes
2 answers

Running a GEB test using Intellij

Being a beginner in GEB testing, I am trying to run a simple login program in Intellij. Could you please help me run this test in Intellij? My question is what selections should I make in the edit configurations page? Please help. This example is…
Dee
  • 223
  • 5
  • 11
0
votes
3 answers

File upload path in a test

A geb test tests file upload in a grails application. According to the documentation the absolute path of the file has to be specified in the test. Is it possible to make the test a bit more portable between developers/machines by including a file…
zoran119
  • 10,657
  • 12
  • 46
  • 88
0
votes
1 answer

Structure Login Success And Failure Features

I'm just getting started with Cucumber and I'm using Geb all inside of a Grails 2.1.1 application. I've got my first test working which tests a successful login. Feature: login to system As a user of the system I want to log in to the…
Gregg
  • 34,973
  • 19
  • 109
  • 214
0
votes
1 answer

What is happening behind the scene when running this Groovy script?

@Grapes([ @Grab("org.codehaus.geb:geb-core:0.7.2"), @Grab("org.seleniumhq.selenium:selenium-firefox-driver:2.15.0"), @Grab("org.seleniumhq.selenium:selenium-support:2.15.0") ]) import geb.Browser Browser.drive { // Load the page go…
Terry Li
  • 16,870
  • 30
  • 89
  • 134
0
votes
1 answer

Run Geb tests with chromeDriver without opening the browser

I want to run my Geb specs with chrome driver without having to watch the tests on the browser? can this be done? P.D.: I know I can use the HtmlUnitDriver, but this driver sometimes gives my errors (caused mainly by timeouts) that the chrome driver…
Tomas Romero
  • 8,418
  • 11
  • 50
  • 72
0
votes
1 answer

difference between geb.env and geb.driver

I am trying to find out the difference between geb.driver option against geb.env. I could not find any concrete documentation on them. I could understand that geb.env is similar to grails.env except, geb env's are defined in GebConfig.groovy.…
Abhijith Prabhakar
  • 1,325
  • 3
  • 12
  • 24
0
votes
2 answers

Grails, Geb, Selenium w/ Chrome: Unable to Connect?

Problem My selenium functional test is failing when I run using the Chrome driver, but works when using Firefox. My Environment Mac OS X Mountain Lion Chrome Version 22.0.1229.94 Build info: version: '2.2.1', revision: '16551', time: '2012-04-11…
John Gordon
  • 2,181
  • 5
  • 28
  • 47
0
votes
1 answer

Logging a right click with spock-geb?

I need to test a right click on a map to drop a marker with Geb. I haven't found any documentation saying how to do this. Does anyone know?
Mitchell Ingram
  • 686
  • 2
  • 11
  • 23
0
votes
1 answer

Groovy code: which library to import

import geb.Browser import org.openqa.selenium.firefox.FirefoxDriver Browser.drive { go "google.com" } I run the script above and get the following error:java.lang.NoClassDefFoundError: org/openqa/selenium/TakesScreenshot
Terry Li
  • 16,870
  • 30
  • 89
  • 134
0
votes
1 answer

Geb Configuration Issue with GebConfig.groovy and Groovy ConfigSlurper

I am trying to get the Groovy based browser automation / testing framework up and running and I am having an issue getting the ConfigSlurper based config working. I have a GebConfig.groovy class in my default package as follows: import…
abehrens
  • 185
  • 1
  • 6
0
votes
1 answer

Grails --- loader constraint violation

In one of my application i have to use geb with grails. i installed geb plugin and added dependency selenium standalone jar. Now the problem is while i cleaning or compiling i got the error like following Interactive mode exited with error: loader…
SivaPhani
  • 81
  • 9