Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8978487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:37:32+00:00 2026-06-15T19:37:32+00:00

@Grapes([ @Grab(org.codehaus.geb:geb-core:0.7.2), @Grab(org.seleniumhq.selenium:selenium-firefox-driver:2.15.0), @Grab(org.seleniumhq.selenium:selenium-support:2.15.0) ]) import geb.Browser Browser.drive { // Load the page go

  • 0
@Grapes([
    @Grab("org.codehaus.geb:geb-core:0.7.2"),
    @Grab("org.seleniumhq.selenium:selenium-firefox-driver:2.15.0"),
    @Grab("org.seleniumhq.selenium:selenium-support:2.15.0")
])
import geb.Browser

Browser.drive {
  // Load the page
  go "http://www.whu.edu.cn"

  // $("a") returns all hyperlinks on the page, similar to jQuery
  $("a").each { a ->
     // Display the required link properties and attributes
     println """
        The link to '${a.@href}' with text '${a.text()}' is at location (${a.x}, ${a.y}),
        with a height of ${a.height}px and a width of ${a.width}px.
     """
  }
}

I just created my first Groovy project in Eclipse and created my first Groovy class inside the project. Everything written for the class is as above. When I ran the script, it didn’t throw any error nor would it terminate in time.

Was it trying to download all the annotated dependencies? If so, does it need to download the dependencies each time it is run? Or it is once and for all?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T19:37:33+00:00Added an answer on June 15, 2026 at 7:37 pm

    When you run this, it will check to see if the correct version of each of the libraries annotated with @Grab has been downloaded, and if not, will attempt to download it. And it’s not just the named libraries, it’s also those libraries’ dependencies.

    So, yes, it can take some time to run this the first time. Subsequent runs should take much less time.

    Note that this is just a convenience. You can also download the required libraries, and specify them in the -classpath argument to the ‘groovy’ command (and remove the Grapes/Grab construct).

    For more info, see http://groovy.codehaus.org/Grape

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems to work: @Grapes([ @Grab(org.codehaus.geb:geb-core:0.7.2), @Grab(org.seleniumhq.selenium:selenium-htmlunit-driver:2.25.0), @Grab(org.seleniumhq.selenium:selenium-support:2.25.0), @Grab(org.seleniumhq.selenium:selenium-firefox-driver:2.25.0) ]) import geb.Browser import org.openqa.selenium.firefox.FirefoxDriver
I have a script where a method is annotated with the @Grab annotation @Grab(group='org.codehaus.groovy.modules.http-builder',
For declaration perspective the following is allowed IList<string> list= new string[3]; list.Add(Apple); list.Add(Manago); list.Add(Grapes);
For example : File 1: Apple Orange grapes File 2: Orange grapes Apple I
I have a string that contains something like this: apple orange pear grapes And
I have a has_many :through model that works perfectly. has_many :varietals has_many :grapes, :through
I need to create a Chart which will grab data from external sources when
Suppose I have this list: thelist = ['apple','orange','banana','grapes'] for fruit in thelist: This would
I have $_GET['tags'] = apples, oranges, bananas, grapes, cherries I need to place the
HI , In Java Script , var a =apple-orange-mango var b =grapes-cheery-apple var c

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.