Selenium IDE Demo A tutorial for beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome in this video I'm going to provide a demonstration on how to use selenium IDE the intended audience of this video are those who are new to are unfamiliar with selenium IDE and which to learn at the user in my previous video I demonstrated how to install selenium IDE in Firefox to run selenium IDE we simply go to a Firefox browser and in the menu bar we should see our selenium IDE icon as indicated here the tooltip should appear great I'm going to select that and up comes in another window and I'm going to move it here that informs us welcome to selenium IDE what would you like to do restore or should I say record a new tests and a new project or open an existing project or closer anybody well I'm going to choose record a new test in a new project so I'm selecting that we're then prompted to name our new project please provide a name for your new project okay I'm going to call it my first test project why not we can change the name of this project at any time later by clicking it and entering a new name okay that's great I'm now going to select ok we're now asked to set the project's base URL this is the base URL from which we were recording our selenium ide scripts so I'm going to type the URL of the website from the Institute of Technology Tala in Dublin Ireland so www m.i.t - tower dot ie great and I'm going to select start recording and it opens up a new browser window so I got to move it over here you can see that it's a selenium IDE is recording so it's currently recording by default which is normal and expected great B were once again that when we run selenium ID for the first time it is automatically recording as indicated by this button here this button is effectively a toggle so to start recording you simply select it I'm going to do that now and when we stop recording were automatically prompted to name our new tests please provide a name for your new tests okay I just want to call it test one for simplicity not an ideal name but it's fine for the purposes of demonstration again we can change it at any time by clicking the the relevant icon beside the name of the tests and a test panel later great so I'm going to select ok and there is test one and of course there are no actions we ran recorded because we didn't do anything I now wish to demonstrate the typical workflow that you would follow when using selenium IDE so the first thing is you would typically add a new test by selecting the plus symbol as indicated here so I'm going to do that now I'm going to choose the name test - just for demonstration purposes and select add the next thing you would do is you type in your base URL so once again I'm going to choose the same base URL that I entered already but just to show you the typical workflow very good next you Dan will typically select record start recording so the control tip is control you are fine so I'm going to select recording and it opens up a new window each time so I'm just going to leave that there why not and I'm going to extend that so it's pretty clear so you see the workflow this is what typically happens and then you simply interact with the website so for example I'm gonna select the search icon here and or prompted to enter in a search term I'm going to search for the term computing and then hit enter and as you notice as I'm interacting with the website the entries of my interaction are entered here great I'm going to scroll down and I'm going to select Department of computing for example then presents me with the relevant page I can scroll down and I'm going to select one of the streams that represented a 90 teller computing but IT management ok select that again it's recording the details here it loads the page excellent and the course content the various different modules I'm going to select the module software quality assurance and testing and it opens up a new window now be aware your browser may be set to block pop-ups so that could have presented us with an error had pop-ups been disabled okay so you see what's happening for each interaction there's recorded an activity in selenium IDE I now wish to unpack and explain what these columns actually refer to so the first column is the command this refers to the actual commands to be executed on the webpage so we opened up the home page here then if you notice I set the window size I resized it then I clicked on the search icon and I clicked in the box and then I entered in the command here is type I entered in computing and then I hit enter in its search first and so on so command refers to the actual command to be executed on the page target refers to the element that we actually interacted with on the page or when refers to the open command which webpage we want to open the the forward slash refers to the base URL and and so on okay and if we click on an element it refers to what we clicked on and so on the value column refers to the value to be used in case of certain commands for example like type text as we can see here I typed in and onto the target name the value computing and so on okay and lastly there's an optional and field which is description and typically this is where you might put in a comment or some extra information information describing the particular command to be executed a useful feature of selenium IDE is that while you're recording you can actually sell a right-click over the webpage for example I'm going to right-click over the text software quality assurance in testing and you'll see there's an option at the end selenium IDE and then I can select these various options here so I can select verify text and it's added a command at the end verify text so it's very useful for testing your application to verify then makes some an expected text is actually we're supposed to be very very nice feature when you finish recording the steps that you wish to record or the interactions you record in the browser you simply select the toggle here home stop recording great and as you can see the message is no longer displayed at it's recording which is expected and then you might have noticed that this icon flashed which which is very good it suggests that we should immediately save our project which is very wise thing to do so I'm going to select save I'm going to navigate to my temp folder and I'm going to choose to default my first test proj that's side so the default extension is s IDE for selenium IDE very good and it's a it's great when you finish recording your test script you can then play it back to check if it properly repeats your test sequence so the first thing I would suggest you do is select the test execution speed at the by default it's set to maximum which is really fast my advice is to set out a little bit slower I'm going to put it just above halfway great and then this is to playback my advice will also be to scroll up and select the first commands so you'll see it in blue as shown there and then finally you select run current tests which is this icon here so I'm going to run that now and as you can see preparing to run tests then it goes to the home page the box appears here is now typing I'm not doing any of this it then goes to a web page very good is that Firefox prevented this site from opening a pop-up window I'm glad you saw that so it's normally going to give maybe anything from 10 seconds to 30 seconds before it'll report an error so I'm going to let this run in real time unless it takes too long I can always edit from the video but it's currently at step 8 and I expect this to go red any moment because it will be unable to open the window due to default settings of pop-ups being blocked so that's something I'm gonna have to change and there you can see it excellent the Select window Winsor the error and as you can see our log file at the bottom under log records all of the operations and it tells us each of the steps 1 2 3 4 5 6 green ok fine don't we come here it's a set window Unser one and try to select the second window which failed to open and it tells us failed and timeout and test 2 ended one error excellent so to prevent this error from reoccurring I'm going to select the options here in my browser click options allow pop-ups for www that I T - Tala - ie that ie and great so it now opens the window but of course the tests has failed so what I'm going to do now is I'm going to close that tab and indeed close this tab so the sudden I've only a blank tab open I'm now going to go back up and select the top again and once more I'm going to select run tests now all going well it'll run this time without error so once again I'm not clicking on anything the selenium is running it so it's on step six seven as you can see here I'm brilliant it's opened up the tab successfully this time and it's jumping to the crack component and then it's opening it up and then it finally opened up the last page and then you scroll down tests to complete it successfully fantastic please be aware that sometimes the selenium IDE plug-in is a little temperamental sometimes the log won't display so you may find you have an error or a failure and you might like to know more detail of what is causing that err so the best thing to do in that case is to save the project and we've already saved it but let me do it here save Jewish replace it yes then navigate to your folder and then right-click and select edit with notepad plus plus this is not ideal but at least is an option so as you can see your data your tests are saved as a JSON file and you can scroll down and for each particular action you can see exactly how selenium IDE navigates and selects that the various CSS the various XPath expressions and so on it's really really nice so this gives you complete and detailed information so this is often very useful for debugging why a particular script won't work okay let me close this there now I now wish to explain the other buttons available in the selenium IDE plugin so I've already shown you the option to run the current test but to the left of that as an icon that allows you to run all of your tests so you could have a whole suite of tests here and by selecting this option it would run them all starting from top to bottom likewise you can actually select any particular command within any given test and then select the step-over current command and this effectively allows you to execute one command at a time effectively step through your test which is really nice you can also disable breakpoints you can also pause and exceptions which is really nice again I've shown you how to save the project you can open up a project here create a new project and of course you can rename your existing project by clicking here great well that concludes my selenium IDE demonstration the next step I would recommend for you to learn more is to go to the following URL and which I'm highlighting here and there's a very nice tutorial and that explains and introduces in a little bit more detail how to proceed so explain the various components the crux of selenium is that as an element locator and selenium supports the following locators and then it walks through and provides a nice demonstration of various commands in action so I had to open how to click or click Add hi descend keys but an example had to highlight with an example had to store values or echo values and so on had to perform verifies and assertions of text and titles very good had to verify elements are present excellent how to pause how to choose okay on the next confirmation and to select the value from a drop-down menu very good how to add a selection to remove a selection to assert an alert very good and so on you can look at those yourself and crucially they provide a full example with the full script that's downloadable so how do you recommend that you work through this example row readers and web page and then work truly see example yourself okay thank you for completeness I should demonstrate how to close the selenium IDE well make sure you've saved your project and then simply and I've already saved it so I'm not going to that again and simply select X up here and that's it thank you very much if you enjoy the video please like it and leave a comment and subscribe to my channel thank you very much [Music]
Info
Channel: Martin O'Connor
Views: 69,203
Rating: undefined out of 5
Keywords: selenium, ide, demo, tutorial, howto, demonstration, use, test, testing, firefox, record, edit, debug, test suite, playback, plugin, beginner, Selenium IDE Demo A tutorial for beginners
Id: ZG3VFDMaAlk
Channel Id: undefined
Length: 14min 28sec (868 seconds)
Published: Sun Oct 28 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.