1 00:00:00,000 --> 00:00:04,691 [MUSIC] 2 00:00:04,691 --> 00:00:06,940 Hi, I'm Craig, and I'm a developer. 3 00:00:06,940 --> 00:00:07,500 In this course, 4 00:00:07,500 --> 00:00:11,020 we're gonna explore the wonderful world of a web browser automation. 5 00:00:11,020 --> 00:00:13,550 If you don't know what that means yet, you're in the right place. 6 00:00:13,550 --> 00:00:16,650 We'll start from the very beginning and work our way into a hands-on 7 00:00:16,650 --> 00:00:21,250 specific use case using a powerful automation framework known as Selenium. 8 00:00:21,250 --> 00:00:24,100 But before we get started, let's take a minute for 9 00:00:24,100 --> 00:00:25,965 you to get familiar with your learning environment. 10 00:00:25,965 --> 00:00:29,150 First, there are speed controls in the video player, so 11 00:00:29,150 --> 00:00:33,340 you can feel free to slow me down or speed me up and I won't mind at all. 12 00:00:33,340 --> 00:00:35,660 Attached to each video, there are teacher's notes. 13 00:00:35,660 --> 00:00:38,420 We'll use this space to share additional information with you. 14 00:00:38,420 --> 00:00:41,430 Now, I'll do my best to let you know when I've added some information on there. 15 00:00:41,430 --> 00:00:44,470 But, trying to get in a habit of checking the notes on each video. 16 00:00:44,470 --> 00:00:47,170 There are lots of great resources tucked away in there. 17 00:00:47,170 --> 00:00:49,620 And finally, don't forget, you aren't alone. 18 00:00:49,620 --> 00:00:51,490 Many other students are taking this course and 19 00:00:51,490 --> 00:00:53,540 might be wondering the same thing that you are. 20 00:00:53,540 --> 00:00:55,580 Make sure you check out the community forum and 21 00:00:55,580 --> 00:00:57,220 ask a question when you have one. 22 00:00:57,220 --> 00:00:59,320 The Treehouse community is very welcoming. 23 00:01:00,330 --> 00:01:03,750 Now in order to make this course as accessible as possible, Nate and 24 00:01:03,750 --> 00:01:07,940 I have decided to use the JavaScript programming language to explore Selenium. 25 00:01:07,940 --> 00:01:10,860 Now if JavaScript isn't your primary language, don't fret. 26 00:01:10,860 --> 00:01:11,850 We'll take it slow and 27 00:01:11,850 --> 00:01:15,490 I'll also include links where you can pick up more JavaScript skills. 28 00:01:15,490 --> 00:01:19,170 There are a few prerequisites for this course, so please check those 29 00:01:19,170 --> 00:01:21,370 just to make sure you're up to date on what we'll be discussing here. 30 00:01:22,480 --> 00:01:26,040 Software development is a process, and it has a lifecycle. 31 00:01:26,040 --> 00:01:28,540 Writing code is only one part of that. 32 00:01:28,540 --> 00:01:31,120 In order to successfully release software to users, 33 00:01:31,120 --> 00:01:33,270 it really ought to be thoroughly tested. 34 00:01:33,270 --> 00:01:37,120 Now, this helps not only to ensure that it is working as it is intended, but 35 00:01:37,120 --> 00:01:40,320 also helps your users avoid unnecessary errors. 36 00:01:40,320 --> 00:01:41,540 Users really don't like bugs. 37 00:01:42,630 --> 00:01:45,570 So, how can you make sure that they don't encounter bugs? 38 00:01:45,570 --> 00:01:47,630 Well, the answer is pretty straightforward. 39 00:01:47,630 --> 00:01:52,250 You check before they see it and you make sure that there aren't any errors. 40 00:01:52,250 --> 00:01:54,190 This is known as testing. 41 00:01:54,190 --> 00:01:56,710 Imagine for a second that you have a web-based application and 42 00:01:56,710 --> 00:01:59,230 there are a few pages with just a couple of flaws. 43 00:01:59,230 --> 00:02:02,710 Now, this might seem like you could just click through each page and 44 00:02:02,710 --> 00:02:04,690 try all the different possibilities. 45 00:02:04,690 --> 00:02:07,970 So when you're done with all that clicking around you realize, wait a second, 46 00:02:07,970 --> 00:02:11,620 not everybody uses Google Chrome and that's the only place I tested it. 47 00:02:11,620 --> 00:02:13,530 I better try Safari. 48 00:02:13,530 --> 00:02:15,010 Okay, now I found some more issues. 49 00:02:15,010 --> 00:02:17,800 I guess I better try Firefox and then Internet Explorer. 50 00:02:17,800 --> 00:02:20,228 And then wait, what about phones and tablets and 51 00:02:20,228 --> 00:02:24,490 what about all those different versions of those browsers that everybody's updated? 52 00:02:24,490 --> 00:02:26,610 Wait, people use different operating systems. 53 00:02:26,610 --> 00:02:29,810 How could you possibly go about testing all those different scenarios, that's so 54 00:02:29,810 --> 00:02:31,240 much testing. 55 00:02:31,240 --> 00:02:35,060 In the teacher's notes, we have included a browser compatibility test matrix 56 00:02:35,060 --> 00:02:37,880 that also takes screen resolution into account. 57 00:02:37,880 --> 00:02:41,680 It turns out that this type of manual testing requires a team of a dozen or 58 00:02:41,680 --> 00:02:45,500 more people to fully test even a simple product that has to support 59 00:02:45,500 --> 00:02:47,240 all these permutations. 60 00:02:47,240 --> 00:02:52,020 Now, testing of this nature is dull, repetitive, and tedious. 61 00:02:52,020 --> 00:02:55,075 It can lead to testers burning out and making accidental mistakes. 62 00:02:56,160 --> 00:02:59,640 This type of manual testing does exist, and it is known to not 63 00:02:59,640 --> 00:03:03,680 only delay product launches, but also slow new product feature creation. 64 00:03:03,680 --> 00:03:06,610 Because all the new features are just another thing to test. 65 00:03:06,610 --> 00:03:10,390 But, but, but you say wisely, there's tons of apps that I use daily, and 66 00:03:10,390 --> 00:03:11,480 they don't have any bugs. 67 00:03:11,480 --> 00:03:13,100 They seem to have new features all the time. 68 00:03:13,100 --> 00:03:14,420 How do they do it? 69 00:03:14,420 --> 00:03:16,152 That's a great question and I'm glad you asked. 70 00:03:16,152 --> 00:03:17,862 The answer there is automation. 71 00:03:17,862 --> 00:03:21,110 You can actually write code that will go into all that clicking and 72 00:03:21,110 --> 00:03:25,520 filling out a form fields and all the permutations and have it report back. 73 00:03:25,520 --> 00:03:27,920 Computers don't get bored by tedious tasks. 74 00:03:27,920 --> 00:03:31,860 I think that you'll see writing automation code is actually pretty fun. 75 00:03:31,860 --> 00:03:33,350 It's a win-win. 76 00:03:33,350 --> 00:03:36,510 Yeah, and you can use this automation code in your testing framework so 77 00:03:36,510 --> 00:03:39,730 your app can be fully tested in all those permutations. 78 00:03:39,730 --> 00:03:41,670 That's yet another win. 79 00:03:41,670 --> 00:03:43,210 So are you ready to start winning? 80 00:03:43,210 --> 00:03:46,400 There are a bunch of automation tools, but Selenium is definitely one of the most 81 00:03:46,400 --> 00:03:50,230 popular ones out there and it has been around for a long time. 82 00:03:50,230 --> 00:03:52,920 Let's take a look at it and its history right after this quick break.