-
-
Notifications
You must be signed in to change notification settings - Fork 962
Geb 8 #15067
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
Conversation
Adapt to changed driver creation logic in Geb 8.
@JonasPammer Would you like to look over these changes? |
grails-geb/src/testFixtures/groovy/grails/plugin/geb/WebDriverContainerHolder.groovy
Show resolved
Hide resolved
Reinstate resetting the system property after driver construction.
Scope the `webdriver.remote.server` System property to the current thread during `RemoteWebDriver` creation, then restore it. This avoids routing later sessions to the wrong endpoint in parallel builds.
now this is what i call generics, haha. I would not even know half of these functions and groovy/thread-nanigans, especially after having used solely django at work for last few months. 🤫 😜 as long as the system env is set for when https://github.com/apache/groovy-geb/blob/4266eeeea6f59e4718339b93283327bf176563b9/module/geb-core/src/main/groovy/geb/Browser.groovy#L172 is called its still the same thing as my original thought/impl. 👍 |
Haha, I thought it might be overkill as well, but what if you mix However, I don't think our GebConfig integration is working perfectly yet. I tried switching to Could not start a new session. Response code 500. Message: Could not start a new session. No nodes support the capabilities in the request
Host info: host: 'f1b81917b1f3', ip: '172.17.0.4'
Build info: version: '4.34.0', revision: '2a4c61c498'
System info: [os.name](http://os.name/): 'Linux', os.arch: 'amd64', os.version: '6.10.14-linuxkit', java.version: '21.0.8'
Driver info: driver.version: unknown
Build info: version: '4.34.0', revision: '707dcb4246*'
System info: [os.name](http://os.name/): 'Linux', os.arch: 'amd64', os.version: '6.8.0-79-generic', java.version: '17.0.14'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [null, newSession {capabilities=[Capabilities {acceptInsecureCerts: true, browserName: firefox, grails:gebConfigUsed: true, moz:firefoxOptions: {prefs: {remote.active-protocols: 1}}}]}]
Capabilities {acceptInsecureCerts: true, browserName: firefox, grails:gebConfigUsed: true, moz:firefoxOptions: {prefs: {remote.active-protocols: 1}}}
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: Could not start a new session. No nodes support the capabilities in the request This is now fixed in fcc4d82 |
This allows using different browsers in `GebConfig.groovy` A `configuredBrowser` property has to be set that matches the browser capabilities used to create the `RemoteWebDriver` to start the correct container for the browser.
Add a more helpful error message in the case where a `containerBrowser` property is missing from `GebConfig.groovy`.
This comment was marked as resolved.
This comment was marked as resolved.
grails-geb/src/testFixtures/groovy/grails/plugin/geb/WebDriverContainerHolder.groovy
Outdated
Show resolved
Hide resolved
grails-geb/src/testFixtures/groovy/grails/plugin/geb/GrailsGebSettings.groovy
Outdated
Show resolved
Hide resolved
Throw exception when `driver` and `containerBrowser` are mismatched in `GebConfig` instead of falling back to chrome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Job! Only minor comments ...
Closes #15065