Reputation: 1983
I've been looking into setting up testing for an app but I'm struggling to get a proper understanding on selenium.
Can anyone explain the significance of selenium web driver and selenium server?
I see its normal to test using mocha as a framework, then using the selenium webdriver and server.
But recently, I read about new frameworks like intern.js that don't require the selenium server, only chromedriver. So is chromedriver just a part of the selenium webdriver that's been extracted?
Having trouble seeing how all these fit in.
Upvotes: 2
Views: 146
Reputation: 18826
All Selenium 2/WebDriver servers (ChromeDriver, MicrosoftWebDriver, GhostDriver, etc.) nominally speak the same WebDriver protocol. So, when your testing software tries to connect to a WebDriver server, it doesn’t matter if the server on the other end is Selenium, or ChromeDriver, or BrowserStack, or anything else, since they all speak the same standardised WebDriver API.
The Selenium server software provides two important extra features that don’t exist if you were to just connect directly to ChromeDriver:
Whereas ChromeDriver only lets you interact with Chrome, Selenium server allows you to interact with multiple different browsers while still connecting to a single HTTP endpoint. When you use a Selenium server, it allows different browsers to register with itself, so when you ask for e.g. Firefox, the Selenium server will find an available Firefox instance for your request and then proxy all traffic for that session to and from that browser.
Selenium server supports translation to/from other browser automation systems that don’t speak the WebDriver API natively, like Mozilla’s Marionette (which used/uses a custom TCP protocol) and the older IEDriverServer.
With regards to ChromeDriver specifically: Historically, Selenium implementations for every browser were written by the Selenium team, but now that WebDriver is an emerging standard, browser vendors are becoming responsible for writing their own WebDriver implementations instead of leaving that work to the Selenium team. Where FirefoxDriver and IEDriverServer are currently still maintained by the Selenium team, ChromeDriver is developed independently by the Chrome team, and in the future each browser vendor will hopefully provide their own WebDriver services.
Upvotes: 2