Download presentation
Presentation is loading. Please wait.
1
WebDriver on Windows 10 Greg Bulmash @YiddishNinja
So I’m here to talk about setting up a simple WebDriver testing environment on Windows 10. Usually when I talk to people about being able to do cool stuff on Windows, I get this reaction. Greg Bulmash @YiddishNinja Image from 1967 Spiderman cartoon opening credits.
2
You can’t be serious! Image via Openclipart.org – CC0 license
I respond… Image via Openclipart.org – CC0 license
3
Do I look like I’m joking?
And they start to come around… Do I look like I’m joking? Image via Pixbay – CC0 license
4
But it might just be crazy enough to work!
It’s crazy. But it might just be crazy enough to work! I’m here to tell you that it can and does work. It’s not perfect, but over the past few years, the W3C has taken on WebDriver as a standard and the browser makers have been getting on board. I first got a chance to play with the Internet Explorer implementation of it when I wrote the docs for it in the Internet Explorer Developer Channel. If you missed IE Dev Channel, don’t worry. The legend is an IE PM made a comment that IE should have a preview branch like Chrome Canary and someone high up said “that’s a good idea. Do it.” Image via Flickr – CC-BY-SA – Attr: That Bill Fellow
5
Image Attr: Ars Technica – License: Fair use
Lasted One Release Developer Channel dropped in June 2014 with a primitive version of WebDriver. I was the member of the IE Developer Center writing team who got to test it out and write the developer docs. They’d implemented about 20 methods and to get it running, you had to download the driver, change your registry to give it access, spin up a COM object in C# to marshal the API calls in and out, and do everything in JSON. And when you were done, you needed to revert your registry because that change could be exploited if you left it in place. I didn’t mess with it again until this year when Pratik asked me to do a second presentation here, gave me a list of preferred topics, and I saw WebDriver on the list. I thought that the tech had been pretty interesting, I knew they’d released a more mature version that worked as a REST server, Chrome had a version, and Mozilla said they had one (more on that later), and I figured I’d look into using them all on Windows 10. Seemed fun. Image Attr: Ars Technica – License: Fair use
6
Okay, tell me about this WebDriver.
<Inigo Montoya>Let me explain. No there is too much. Let me sum up</Inigo> We’ll start with Selenium. It was created in 2004… It was basically a browser remote control intended to simulate user interaction with the browser to make it easier to test what happened when users did stuff. It worked by injecting JavaScript into the page you were testing. Of course, as browsers implemented same origin policy controls to prevent bad guys from injecting script, it made it harder for tools like Selenium to do it too. Okay, tell me about this WebDriver. Image via Pixbay – CC0 license
7
WebDriver got under the hood.
WebDriver was implemented to allow Selenium’s commands to be issued to the browser at an operating system level, so it didn’t have to be done in JavaScript. This was great except for the fact that these OS-level implementations weren’t being built by the browser manufacturers. That meant they were a bit hacky and support for new browsers lagged the browser releases. In 2012 the W3C started a working group for the WebDriver spec. That convinced the major browsers to get on board and provide officially blessed WebDriver implementations. With these drivers, as we’ll see in a moment, you get simple REST servers that you can pass JSON commands in and out of. Still, Selenium embraced WebDriver and when we get to using Selenium we’ll put these WebDriver drivers to use. Image via Wikimedia – CC-BY-SA license – Credit: T. Voekler
8
But will I ever see some code?
He keeps talking. But will I ever see some code? The Edge and Chrome WebDriver implementations actually create local REST servers at which you can throw JSON formatted commands, using the JSON Wire Protocol. So now we’re going to shut down PowerPoint, spin up the servers, and throw some JSON at them, shall we? Image via Pixbay – CC0 licensed
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.