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

How to use Geb without using Grape dependency management

I'm new to Geb and trying to do a quick test to evaluate it before further use. Due to proxy permissions etc I would like to do so without using Grape. Therefore, I have attempted to download the required jars manually and am attempting to specify…
I Stevenson
  • 854
  • 1
  • 7
  • 24
0
votes
1 answer

Can we use global variables in the When Block of Spock Spec

I am trying to utilise the global variables to store some data in my spock specs but not sure about the implementation. The reason for this is to utilise the values from the profile of the user and verify it at the time of check out. To be precise,…
vijay pujar
  • 1,683
  • 4
  • 19
  • 32
0
votes
2 answers

Geb, Spock, Groovy - Issue in executing methods from other groovy classes in Test class

I have set up Geb + Spock + Groovy and able to run a one sample script successfully. Now I have created one method in another groovy class (this class I have putted in resource folder) which I am calling in my test class but it giving me below error…
0
votes
1 answer

waitFor criteria to check for existence of matching text in div's innerHTML?

After getting geb to click a login button, I want to wait for the next page to load. The next page contains the following:
Welcome
There isn't really any other content that allows me to test…
Chris Snow
  • 23,813
  • 35
  • 144
  • 309
0
votes
1 answer

Geb Exception: java.lang.NoClassDefFoundError: geb/error/GebException

IDE is Configured to use: java: 7 geb: 0.9.1 Selenium java client and web driver: 2.35 When running the simple groovy script: import geb.Browser def browser = new Browser() I get the following error: Caught: java.lang.NoClassDefFoundError:…
Dave
  • 2,126
  • 1
  • 15
  • 18
0
votes
3 answers

Cannot get a checkbox

I cannot get the checkbox selector from the documentation working. Any idea why? $('checkbox').size() is always zero. HTML page Geb
zoran119
  • 10,657
  • 12
  • 46
  • 88
0
votes
1 answer

Can't create google chrome driver on Mac for Geb test

I am using Geb to run a Grails function test. I want to use the Chrome driver, I follow these instructions: https://code.google.com/p/selenium/wiki/ChromeDriver I install the google chrome driver at: /Applications/Google\…
Breako Breako
  • 6,353
  • 14
  • 40
  • 59
0
votes
1 answer

Keep getting JavaScript messages in Geb test

Following this tutorial: http://fbflex.wordpress.com/2013/03/18/how-to-configure-webdriver-in-grails-for-your-geb-tests/ I do: def "go to page"() { when: go "http://www.grails.org.mx" then: title == "GrailsMX | Groovy y…
More Than Five
  • 9,959
  • 21
  • 77
  • 127
0
votes
1 answer

Geb - no input for numbers 2 and 4

I wanted to test my webapp with Geb and Grails and come across a strange error. When I tried to enter numbers 2 or 4 into an input, these numbers are ignored and no number is entered. Other numbers work fine. This error occured when I used Chrome…
Lojza Ibg
  • 658
  • 9
  • 32
0
votes
0 answers

Grails 2.2.2 Geb 0.9.0 Spock 0.7 exception

I create a project with grails 2.2.2, add test "org.seleniumhq.selenium:selenium-firefox-driver:2.28.0" test "org.seleniumhq.selenium:selenium-support:2.31.0" test "org.gebish:geb-spock:0.9.0" test "org.gebish:geb-junit4:0.9.0" test…
Fiftoine
  • 271
  • 5
  • 17
0
votes
1 answer

Running tests in a spec in a sequence

Is there a way to run the tests within a spec in sequence? @Stepwise class TestSpec extends GebReportingSpec { def 'A'(){ // } def 'B'(){ // } def 'C'(){ // } } Is there a way I can force A to run…
lakshmi
  • 385
  • 3
  • 8
  • 18
0
votes
1 answer

Work with Database using Spock and Geb.

I hope someone have already faced an issue to verify that application shows correct data from database. I reviewd how groovy used SQL, but I have no idea where and how I should do that. I'm just starting to use gradle+Spock+Geb for testing…
Evgeniy
  • 540
  • 4
  • 17
0
votes
2 answers

Is it possible to assert that the page has stopped scrolling in a waitFor

I have a page where I click a "change" link which displays another section. When this happens, the page scrolls vertically a bit so that the visible section is somewhat centered on the screen. My next step in the test is to click something inside…
Gregg
  • 34,973
  • 19
  • 109
  • 214
0
votes
3 answers

Geb page url method from ConfigSlurper

I am trying to store the urls I need in a config file that gets pulled using ConfigSlurper. I think this may not work but not sure. Thoughts?
jrock2004
  • 3,229
  • 5
  • 40
  • 73
0
votes
0 answers

Scrape Web Pages in Batch Mode with Groovy Geb Library

I'd like to scrape some Web pages given their urls. The Geb library is claimed to be capable of screen scraping. What I have got so far is use the Browser.drive method and specify one page url in the method. That way I've been able to scrape data…
Terry Li
  • 16,870
  • 30
  • 89
  • 134