When comparing Selenium vs Geb, the Slant community recommends Selenium for most people. In the question“What are the best test automation tools for web apps?” Selenium is ranked 1st while Geb is ranked 6th. The most important reason people chose Selenium is:
The WebDriver protocol is standardized by the World Wide Web Consortium which makes it easy for third-parties to get involved and contribute to Selenium. WebDriver has been the foundation of many additional automation projects besides core selenium and has become the de-facto standard for UI automation.
Ranked in these QuestionsQuestion Ranking
Pro Uses an approved WC3 standard - WebDriver
The WebDriver protocol is standardized by the World Wide Web Consortium which makes it easy for third-parties to get involved and contribute to Selenium.
WebDriver has been the foundation of many additional automation projects besides core selenium and has become the de-facto standard for UI automation.
Pro Integrates with any CI tool
Selenium, with its ability to interact with different testing frameworks, like NUnit or xUnit, makes it easy to get Selenium working with practically any Continuous Integration services.
Supports many browsers and a solid platform for adding future browsers to selenium (WebDriver)
Pro Actively supported
The open source community behind Selenium has a very large & engaged developer base. This ensures a stable support channel for the tool. In addition, various companies also provide support for Selenium. This active and multi-channel support provides a much more lucrative option for developers looking to implement Selenium in their workflow.
Pro You can use the same IDE you use for coding to debug
Pro Integrates well with existing testing frameworks
Pro Support for many languages
Selenium is based on Java and can be run on Windows, Mac, Linux, Unix, etc.
Pro Ability to imitate a real user using the application
Testing is analogous to a human being using the web application which is not possible with a solution which runs headless and claims to run faster than Selenium.
Pro Use the very minimum amount of code required to run
Selenium tries to inject into the page only the bare minimum of code needed to run the tests.
Pro Easy to set preconditions for the tests
Pro Easy integration with build systems
It's very easy to integrate Geb with any build system.
Pro Asynchronous requests testing is a easier
Asynchronous web pages can easily be tested with Geb as it has built in, easy to use support for testing such operations.
Con The IDE for recording isn't too powerful
Con Issues with locators
Locators that support common attributes like:
Con Low IDE support
There are not many IDEs that support Geb.