Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grails 6m4 error when running tests #12996

Closed
fernando88to opened this issue May 19, 2023 · 1 comment
Closed

Grails 6m4 error when running tests #12996

fernando88to opened this issue May 19, 2023 · 1 comment

Comments

@fernando88to
Copy link

Expected Behavior

When executing the test command an error is thrown

Actual Behaviour

./gradlew test  ✔

Task :configureChromeDriverBinary FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':configureChromeDriverBinary'.

com.github.erdi.gradle.webdriver.repository.DriverUrlNotFoundException: Driver url not found for name: "chromedriver", version regexp: "\Q2.32\E", platform: "linux", bit: "64", arch: "amd64"

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 7s

Steps To Reproduce

  1. grails create-app com.fernando.grails6m4
  2. ./gradlew test

Environment Information

Manjaro 22.1.1
openjdk 11.0.17 2022-10-18

Example Application

No response

Version

6.0.M4

@fernando88to
Copy link
Author

fernando88to commented Oct 6, 2023

I believe it is a problem with my environment, in this case manjaro, it is looking for the bins in the wrong place, it looks for snap packages.

I changed the configuration of the GebConfig.groovy file below and it worked perfectly

//file:noinspection CompileStatic
//file:noinspection GrUnresolvedAccess
//file:noinspection UnnecessaryGString
import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.firefox.FirefoxOptions
import org.openqa.selenium.safari.SafariDriver

driver = {  // Default driver configuration
    FirefoxOptions options = new FirefoxOptions()
    options.setBinary("/usr/bin/firefox")  // Especifique o caminho do executável do Firefox aqui
    new FirefoxDriver(options)
}

environments {

    // You need to configure in Safari -> Develop -> Allowed Remote Automation
    safari {
        driver = { new SafariDriver() }
    }

    // run via “./gradlew -Dgeb.env=chrome iT”
    chrome {
        driver = { new ChromeDriver() }
    }

    // run via “./gradlew -Dgeb.env=chromeHeadless iT”
    chromeHeadless {
        driver = {
            ChromeOptions o = new ChromeOptions()
            o.addArguments('headless')
            new ChromeDriver(o)
        }
    }

    // run via “./gradlew -Dgeb.env=firefoxHeadless iT”
    firefoxHeadless {
        driver = {
            FirefoxOptions o = new FirefoxOptions()
            o.addArguments('-headless')
            new FirefoxDriver(o)
        }
    }

    // run via “./gradlew -Dgeb.env=firefox iT”
    firefox {
        // Esta configuração será usada quando o ambiente 'firefox' for especificado.
        // Se você deseja a mesma configuração que o padrão, você pode omitir este bloco.
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant