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
24
votes
1 answer

Determine order of execution of Spock tests

Is there a way to set the order in which tests are executed within an Spock Specification? For example: class MySpec extends IntegrationSpec { def 'test A'... def 'test B'... } I want 'test A' to be execute always before 'test B' This is…
Tomas Romero
  • 8,418
  • 11
  • 50
  • 72
21
votes
7 answers

Not able to maximize Chrome Window in headless mode

I recently upgraded my chrome version to 60 and chromedriver to version 2.31. Post that I have started getting the following exception when I try to do a maximize of the browser…
Pinaki
  • 473
  • 1
  • 3
  • 14
13
votes
1 answer

What does curly brackets syntax mean in Groovy?

What does this syntax mean in Groovy? class CreateMessagePage extends Page { static at = { assert title == 'Messages : Create'; true } static url = 'messages/form' static content = { submit { $('input[type=submit]') } …
Dims
  • 47,675
  • 117
  • 331
  • 600
12
votes
1 answer

Spock + GEB vs. Robot Framework

Previously I used Robot Framework to automate testing of applications, but a new client asked pay attention to Spock + GEB. I've never used it, but I need to quickly compare two of these tools and make a choice. Please help me to understand how they…
Evgeniy
  • 540
  • 4
  • 17
11
votes
2 answers

grails geb -baseUrl option does not work for remote services

I'm using the geb 0.9.2 plugin for grails 2.3.4 I want to run the functional tests separately from the service, on two separate hosts. I have observed the following: If I run the service on the same host, and execute: grails test-app functional:…
Ben Clifford
  • 1,398
  • 1
  • 12
  • 23
9
votes
2 answers

Spock GlobalExtension is not loaded (grails)

I want to register a Listener to all spock geb specs in my grails-app so I added a IGlobalExtension to myapp/src/groovy package myapp.spock class TakeScreenshotExtension implements IGlobalExtension { @Override void visitSpec(SpecInfo…
Moritz
  • 489
  • 1
  • 5
  • 18
9
votes
1 answer

Gradle NoClassDefFoundError

So I am trying build a simple gradle app and when I run it, I getting geb.ConfigurationLoader$UnableToLoadException: Unable to load configuration @ 'file:/Users/john/Development/groovy/gradlegebautomation/build/resources/test/GebConfig.groovy' (with…
jrock2004
  • 3,229
  • 5
  • 40
  • 73
9
votes
1 answer

Learning GEB and Spock

I am a manual tester trying to learn GEB and Spock. To learn these do I have to have prior knowledge of java or groovy? I have been reading the book of GEB, What are the prerequisites, books or learning resources? Please help. Thanks.
Dee
  • 223
  • 5
  • 11
9
votes
5 answers

how to define step definitions location for cucumber in intelliJ 12

I have my feature files in src/resources/com/features and my step definitions in src/main/java/com/step_definitions My tests all run correctly, but intelliJ refuses to see where the step defs are, even if I ask it to create a new one. Where is this…
theawesome
  • 313
  • 1
  • 3
  • 9
8
votes
2 answers

How to use Geb to check element attribute value after page event

After a bit of help here, I am writing a functional web test using Geb and want to test the disabled attribute value of an form submit button both before and after an event has occurred, the flow should be as follows: Load page, submit button is…
Edd Grant
  • 774
  • 2
  • 10
  • 22
8
votes
2 answers

Geb login spec by example

I am trying to get familiar with Geb. I’m trying to run it from inside Grails, but that shouldn’t matter at all since my question here is specific to Geb. I have the following test directory structure: myapp/ test/ …
smeeb
  • 27,777
  • 57
  • 250
  • 447
8
votes
1 answer

Geb Configuration

This seems like it should be pretty straightforward, but I am not seeing how to get access to values in my GebConfig.groovy file. I've tried the following: userName = "myUserName" properties = { userName = "myUserName" } props { userName =…
Scott
  • 9,458
  • 7
  • 54
  • 81
7
votes
1 answer

How can Geb functional tests be used for performance/capacity testing?

Is anyone aware of any tools that would allow Geb functional tests to be used for performance testing? In the "Continuous Delivery" book, it's suggested that functional tests can be used for performance testing, just wondering if anyone has any…
AndrewW
  • 678
  • 6
  • 18
7
votes
3 answers

In Geb, what is the difference between displayed and present?

I am writing functional tests and dealing with a modal window that fades in and out. What is the difference between displayed and present? For example I have: settingsModule.container.displayed and settingsModule.container.present where…
ontk
  • 942
  • 1
  • 10
  • 24
6
votes
5 answers

How can I pass JVM system properties on to my tests?

I have the following task task testGeb(type:Test) { jvmArgs '-Dgeb.driver=firefox' include "geb/**/*.class" testReportDir = new File(testReportDir, "gebtests") } The system property doesn't appear to make it to the Geb tests, as Geb does…
Ray Nicholus
  • 19,538
  • 14
  • 59
  • 82
1
2 3
54 55