martin-ober opened a new issue, #286:
URL: https://github.com/apache/groovy-geb/issues/286
when using env.groovy with BindungUpdater with selenium 4.35.0 geb is
crashing.
Caught: groovy.lang.MissingPropertyException: No such property: js for
class: geb.Browser
groovy.lang.MissingPropertyException: No such property: js for class:
geb.Browser
at geb.binding.BindingUpdater.initialize(BindingUpdater.groovy:79)
at env.run(env.groovy:8)
Running on Mac OS 14.7.4
openjdk 21.0.6 2025-01-21 LTS
OpenJDK Runtime Environment Temurin-21.0.6+7 (build 21.0.6+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.6+7 (build 21.0.6+7-LTS, mixed mode,
sharing)
sample code with geb 8.0.0 (but same error in 7.0)...
- `gradle runEnv` ==> groovy.lang.MissingPropertyException: No such
property: js for class: geb.Browser
- `gradle runEnv -PseleniumVersion=4.34.0` ==> running
build.gradle:
```
plugins {
id 'groovy'
}
repositories {
mavenCentral()
}
def seleniumVersion = project.findProperty("seleniumVersion") ?: "4.35.0"
dependencies {
implementation "org.apache.groovy.geb:geb-core:8.0.0"
implementation "org.seleniumhq.selenium:selenium-java:${seleniumVersion}"
}
task runEnv(type: JavaExec) {
description = "executes env.groovy"
group = "verification"
classpath = sourceSets.test.runtimeClasspath
main = "groovy.lang.GroovyShell"
args = ["src/test/groovy/env.groovy"]
}
```
src/test/groovy/env.groovy:
```
import geb.Browser
import geb.binding.BindingUpdater
println "env.groovy started"
def browser = new Browser()
def bindingUpdater = new BindingUpdater(binding, browser)
bindingUpdater.initialize()
println "BindingUpdater initialized"
try {
def result = js.exec("return 1")
println "js.exec success: $result"
} catch (MissingPropertyException e) {
println "MissingPropertyException - js: ${e.message}"
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]