✔ How To Understand New Selenium 4 Architecture: W3C WebDriver Protocol_Part 4 | (Video 151)

Published: 12 October 2020
on channel: Rex Jones II
835
23

How To Understand New Selenium 4 Architecture: W3C WebDriver Protocol

► Watch Complete Selenium 4 Playlist/Series    • Selenium 4 New Features  

► Download Presentation and Transcript from GitHub https://github.com/RexJonesII/Free-Vi...

► Free Selenium PDF Book: https://www.rexjones2.com/book-seleni...
► Free Java PDF Book: https://www.rexjones2.com/book-part-1...
► All Paperback & eBooks: http://tinyurl.com/Rex-Allen-Jones-Books

Social Media Contact
✔ YouTube    / rexjonesii  
✔ Twitter   / rexjonesii  
✔ LinkedIn   / rexjones34  
✔ GitHub https://github.com/RexJonesII/Free-Vi...
✔ Facebook   / jonesrexii  

► Transcript
The W3C WebDriver Protocol has at least 3 advantages. #1 It provides standards #2 It provides stability and #3 It provides an updated Actions API that is supplied with better resources. I will talk about all 3 and get straight to the point.

If you are interested in more videos, you can subscribe to my YouTube channel and click the bell icon. You can also follow me on Twitter, connect with me on LinkedIn and Facebook. I will also place the transcript and presentation slides on GitHub. In this session, I am going to speak about the Selenium 4 Components, Advantages, Mobile Automation, and Cloud Platforms.

Components
Starting with the components, Selenium has moved from 3 to 4 because of the W3C WebDriver Protocol. This is an example of Selenium 3 which includes the JSON Wire Protocol. The objective of JSON Wire Protocol was to transfer information from the client to the server. That information was processed over HTTP by sending HTTP Requests and receiving HTTP Responses.

Direct
With Selenium 4, the JSON Wire Protocol has been removed from the new architecture. Now, there is direct communication between the Browser Drivers and Selenium Client & WebDriver Language Bindings. The 1st component has 2 parts combined into one. Selenium Client is a separate part and WebDriver Language Bindings is a different part. Selenium is an API that have commands for automating our browser. WebDriver has only 1 job and that job is talk to the browser through a driver.

Each language has their own bindings. Bindings mean the same commands written for Java is also written for C#, Python, Ruby, and JavaScript. You may have noticed that Selenium added support for the W3C protocol starting at version 3.8. According to Simon Stewart, in this Selenium 4 Webinar with BrowserStack, he mentioned the versions of Selenium since 3.8 have spoken to both JSON Wire Protocol and W3C Protocol. After running your Test Script, look for INFO: Detected dialect: W3C to see if your Selenium version is speaking to W3C. Both of these screenshots show W3C for Selenium 3.8 and Selenium 4. If not W3C then it will show OSS which means Open Source Software.

Back to our diagram, we see the 2nd component is Browser Drivers and it have 2 functions. The first function is to receive a request from Selenium Client & WebDriver Language Bindings then pass that request to the browser. A driver also known as a proxy is responsible for controlling the browser. The second function is to return a response from the browser back to the Selenium Client & WebDriver Language Bindings. All of the drivers use the W3C WebDriver Protocol and most of them are created by the browser vendors.

When it comes to the 3rd component Web Browsers. This is where all of the Selenium Commands are performed. The browser receives a request, performs the request, and sends back a response to the driver. Also, notice how Opera is not available as a driver or browser. In reality, they are still available but I did not add them because the WebDriver implementations are no longer under development so native support has been removed for Opera and Phantom JS.

Remote
Remote is another form of communication to the browser. It can happen through the RemoteWebDriver or Selenium Server. The RemoteWebDriver is a class that implements the WebDriver Interface. With Selenium 4, FirefoxDriver and SafariDriver continue to extend RemoteWebDriver. However, ChromeDriver and EdgeDriver no longer extend RemoteWebDriver but they extend ChromiumDriver. In the introduction, I showed how ChromiumDriver, FirefoxDriver, InternetExplorerDriver, OperaDriver, and SafariDriver all extend RemoteWebDriver. We see 3 of the boxes (RemoteWebDriver, Browser Drivers, and Web Browsers) are gray because they all run on the same system.

The Selenium Server is different. It’s a way to communicate remotely when talking to the driver but not on the same system as the driver. That’s why Selenium Server is a different color. We start the server by using the Selenium Standalone jar file.

#Selenium4 #HowToUnderstandSeleniumArchitecture #W3CWebDriverProtocol


Watch video ✔ How To Understand New Selenium 4 Architecture: W3C WebDriver Protocol_Part 4 | (Video 151) online without registration, duration hours minute second in high quality. This video was added by user Rex Jones II 12 October 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 835 once and liked it 23 people.