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
5
votes
2 answers

log4j2 config file is not being recognized

I'm trying to get log4j2 setup in my Geb framework. For the life of me I can't figure out how to put this together. I have a log4j2.xml (not log4j.xml) file setup with the logger "Selenium". In DefaultPage I try to get the Logger with the name…
TIMBERings
  • 361
  • 1
  • 4
  • 17
5
votes
2 answers

Geb tests pass with Chrome, fail with PhantomJS

I have noticed that some Geb functional tests pass with Chrome but fail with PhantomJS, holding all other variables constant. This happens mostly with pages that have some kind of asynchronous activity - one call to $(selector).click() triggers an…
wrschneider
  • 17,913
  • 16
  • 96
  • 176
5
votes
4 answers

How to select the second Class element using jQuery working with Spock/Geb

I have done a lot of research to find out the answer for the following to no avail. I have the following class in one
tag in the HTML.
5
votes
3 answers

Selenium addCookie getting Invalid Cookie Domain Exception even though I'm on the right domain

So I'm trying to load previously saved cookies into my web driver with Selenium/Geb. First I goto the domain and then try to add the cookies. But the cookie domain and the url domain don't register with each other: Caught:…
greenspider
  • 81
  • 1
  • 1
  • 5
5
votes
1 answer

Executing Specific Geb Tests according to environment

I have a set of Spec tests I am executing within a Grails Project. I need to execute a certain set of Specs when I am on local, and another set of Spec when I run the pre-prod environment. My current config is executing all my specs at the same time…
ErEcTuS
  • 777
  • 1
  • 14
  • 33
5
votes
2 answers

How to setup and teardown functional test data in Geb grails

I have many working/passing functional geb/spock tests (each extending GebReportingSpec) that are testing a web application with test data all created from the BootStrap.groovy at the beginning of the functional test suite. I want to move the test…
John Dalton
  • 249
  • 5
  • 13
5
votes
2 answers

How to submit a form in Geb (WebDriver) that has no submit button

I'm building up a test in Geb (WebDriver) that has the need to work with a form that has no submit button. From the user's perspective, it is as simple to use as typing in the search term and hitting the enter key on their keyboard. Using Geb in a…
Michael Oryl
  • 20,856
  • 14
  • 77
  • 117
5
votes
1 answer

How to control-click items using Geb?

I'm working with Geb on automating testing of a web application that uses ExtJS to present much of its UI. I'm in a situation where I need to ctrl-click several ExtJS-generated table cells representing 'categories'. How do I use Geb to ctrl-click…
Ian Durkan
  • 1,212
  • 1
  • 12
  • 26
5
votes
1 answer

How do I run a subset of spock functional tests in grails?

In some other testing frameworks I'm used to tagging tests, eg @really_slow, @front_end And then running different batches of tests, like I might want to set up a build slave to run all the really_slow tests, and might want to run all the tests…
The Trav
  • 1,955
  • 3
  • 22
  • 30
4
votes
1 answer

Can't pass closures in groovy

I am trying to run a basic example for the Geb library (http://www.gebish.org/manual/current/intro.html#introduction). Here is the code: import geb.Browser Browser.drive { go "http://google.com/ncr" // make sure we actually got to the…
Adam Lewis
  • 933
  • 7
  • 9
4
votes
3 answers

How to select a combobox in geb with groovy

This is what I have currently with Geb. I want to be able to retrieve and set the value of a combobox (or drop down) in a page. I'm not quite sure how to do it, and the Book of Geb does not seem to cover this. This is the HTML element that I'm…
Jonathan Frias
  • 200
  • 4
  • 9
4
votes
1 answer

How do I run one specific spec in Spock? Using it with GEB and gradle

I'm creating a fairly large test suite using gradle, geb, and spock in conjunction. Gradle is obviously building and kicking off geb and spock, but I think that spock is where I can control and specify which Spec to run. I'm building this based off…
Drew Royster
  • 120
  • 12
4
votes
1 answer

How do you create static page content when dealing with multiple frames?

I just recently started working on testing a new application, and I have begun to model the page objects for said application. I found out that this application uses "frames" as in the DOM contains 2 or more HTML element tags. By default it looks…
switch201
  • 587
  • 1
  • 4
  • 16
4
votes
2 answers

Is Geb(automation testing framework) a good acceptance testing framework?

Is Geb(automation testing framework) a good acceptance testing framework?
Prabu
  • 101
  • 2
  • 7
4
votes
1 answer

Class cannot resolve module as content unless @Stepwise used

I have a Spock class, that when run as a test suite, throws Unable to resolve iconRow as content for geb.Page, or as a property on its Navigator context. Is iconRow a class you forgot to import? unless I annotate my class with @Stepwise. However, I…
SourMonk
  • 344
  • 1
  • 3
  • 15
1 2
3
54 55