Hi Aditya, When you say that nothing happened does that mean that execution hanged or did you get an exception? When you say you run the programm, do you mean that you are running a specification extending from GebSpec?
Gradle does not know anything about Geb's config and thus build.gradle does not call the GebConfig script. It is automatically loaded and executed by Geb via the ConfigurationLoader class when instantiating a Browser ( https://github.com/geb/geb/blob/master/module/geb-core/src/main/groovy/geb/Browser.groovy#L61). This happens as long as there is a GebConfig.groovy script available as a resource on the classpath or there is a class called GebConfig available on the classpath. Marcin On Thu, 23 Feb 2017 at 03:27, ADITYA GAURAV <[email protected]> wrote: > Hi, > > Recently, I moved to Geb. In the project, there is a groovy class named as > 'GenConfig.groovy'. In this class, we set our driver and browser > configuration. I have few observations. > > 1.How does 'build.gradle' use this class? > 2.In my project, we are not calling this from any of the classes as per my > knowledge then how does driver open the URL that is mention in this class. > As I know in Geb we mention our baseUrl that is being called by the browser. > 3. Or from somewhere internally Geb is calling this on driver instance. > > This question came out when I have created a new project for my practice. > That project is the combination of "Geb+Spock+Gradle". In that, I have > created "GebConfig.groovy" class and provided all the required > configurations of driver and baseUrl. Then I simply wrote a groovy class > to open a browser and perform some activity. But when I ran the program > nothing happened. It didn't open the browser. So how do I use > that GebConfig.groovy in our project to make it work. Do I need to make any > changes in my 'build.gradle'? > > > > > Thanks, > Aditya > > > -- > You received this message because you are subscribed to the Google Groups > "Geb User Mailing List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/geb-user/b07a610e-73bb-4566-9e01-b85817bba078%40googlegroups.com > <https://groups.google.com/d/msgid/geb-user/b07a610e-73bb-4566-9e01-b85817bba078%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/CA%2B52dQTnRuXnfaWdvHZkJz7M2HO7vTKswP%3DwFo1DDM627s-y8g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
