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 setup Geb running with firefox and TestNg?

I tried to setup Geb to start and writing my automation code, but I found it difficult and did manage to do so despite Geb wiki (http://www.gebish.org/manual/current/). I didn't find any sufficient example. Please, does anyone have any setup example…
0
votes
2 answers

May I use WebDriver APIs directly in GEB tests?

While writing automated tests using GEB framework, may I use the Webdriver API's directly? For example, some thing like as below: WebElmenent element=driver.findElement(By.xpath("//input...")) WebElement myDynamicElement = (new WebDriverWait(driver,…
0
votes
1 answer

Cannot invoke method propertyMissing() in Groovy

I am getting Cannot invoke method propertyMissing() error while trying to take screenshots in Geb. Following are the classes MyLoginPage.groovy package geb.pages import geb.Page class MyLoginPage extends Page { static url =…
Shabar
  • 2,617
  • 11
  • 57
  • 98
0
votes
1 answer

Geb hitting dropdown form elements: (error-couldn't select option with text or value)

I'm writing some Geb test for a form. For some reason I can't hit any of the dropdowns in my form. Example field:
State
ry1633
  • 453
  • 1
  • 10
  • 24
0
votes
1 answer

Geb select element that contains something

How do I select the value of a form select field when it has random numbers in its name? I have tried: formValidity {$("form").(contains('validity')) = "1…
Eligijus
  • 634
  • 1
  • 6
  • 15
0
votes
0 answers

Grails Geb test report show date and time

Is it possible to make it so that Grails Geb test reports wont be deleted after each new test and that they would all be shown in a single page with date and time?
Ezurek
  • 51
  • 1
  • 5
0
votes
1 answer

How to make an element visible using Geb?

I have an element with class "popup", which i want to make visible during a functional test. What is the best way to programmatically make the element visible? I am using Geb for functional testing.
Ashish Joseph
  • 1,103
  • 3
  • 12
  • 35
0
votes
0 answers

Geb with browser sample running example

I searched google for geg+browser stack real time example but couldnot found any working example. Could you please help me in getting a real time example for the same ?
0
votes
2 answers

When using gradle with Geb, how is the order of execution determined for my specifications?

I have a set of specifications that need to be ran in an exact order for the last specification to be relevant. These specifications need to be dependent on each other because of a complex use case involving server resiliency (1 server going down,…
Dave
  • 2,126
  • 1
  • 15
  • 18
0
votes
1 answer

Geb - Inconsistent behaviour in headless mode

I am testing a grails application and have the tests run by Hudson. The tests are passing 100% of the time when run on local machine. Database Is always reset when the tests initialize. I have problem setting the value for a dynamic form. In my .gsp…
Giannis
  • 5,286
  • 15
  • 58
  • 113
0
votes
1 answer

How to run specific test cases or spec in intelliJ Idea IDE?

We are using geb framework for our testing with IntelliJ IDE. many times we need to run only few test cases in a a spec. For that either we are running the whole spec or one by one. Is there any way to run the specified test cases?
K V
  • 95
  • 9
0
votes
1 answer

How to testing Spring Boot REST with Spock/Geb after server has been started?

I would like to test a REST service from Spock or GEB but would like to fireup the server before the tests are started. Is this possible?
Marco
  • 15,101
  • 33
  • 107
  • 174
0
votes
1 answer

Running Geb + spock tests headless

I have a number of geb functional tests for a grails application. The tests are working as expected when executed from terminal or IDE. Although the tests need to be executed by hudson, so they are run in headless mode using Xvfb. The problem is…
Giannis
  • 5,286
  • 15
  • 58
  • 113
0
votes
1 answer

Why my GEB script fails when I use a seperate helper function?

I was trying to run a GEB test using Gradle; It works fine if I run everything from a method but fails if I use a helper function: Scenario 1 that works: def "Select ORG Unit and save the invoice and Delete it"() { when: "We click…
Sharif Mamun
  • 3,508
  • 5
  • 32
  • 51
0
votes
1 answer

How to perform an action if an element exist on the page in GEB?

I was working on a dynamic page. Is there any way that I can do something like below in GEB? if ( $('#hideAnnouncement').isDisplayed() ){ waitFor{ $('.icon').click()} waitFor{ !$('#hideAnnouncement').isDisplayed()} } Any help or suggestion…
Sharif Mamun
  • 3,508
  • 5
  • 32
  • 51