Transcripted Summary

The way that a project is organized within Selenium IDE, is the concept of tests, suites, and then the project itself. There's a little drop down here at the top left of Selenium IDE and it changes the panel view on the left.

You've got to be in tests, tests suites, or a report of what's being executed (or was executed).

Right now, we're in tests. Then we can jump into tests suites. You can see there's a default suite that's added, and the test that we created initially, the log in test in the previous video, is here.

If we wanted to create another test, we can come in here, and then into the test panel view, and then click the plus button. Then it would prompt us for a test case name. We could have a test for invalid credentials.

Just briefly I want to show that if we have the same name, it's an invalid test name.

It has to be unique — "login invalid" — so we'll create a test to effectively do the same thing that we just did for a successful authentication but verify that we were unsuccessful.

We can start from a blank slate like this and click record and step through it. It opens up a new window, and then we can step through clicking the form authentication link, and then just putting in bogus credentials, clicking “Login”, and then verifying that we got this error notification.

Just like before, we can use the right-click menu, and then click a certain text and add an assertion.

If we jump back over here to the IDE, we can click the “stop” icon. Then run through the test, and make sure that it works.

Cool, it passes.

That's creating a simple test. There's also a right click, or this hamburger menu, where we could have duplicated the test, and just modified it in place.

We can rename an existing test. Like we could rename this to say, "login valid," versus "login invalid." And then we can also delete a test.

Every time we make a change, it's worth noting that there's this little asterisk that appears for things that were changed that haven't been saved yet. The same thing happens here. The project is changed, and so it got this little star. Then this test itself is what changed.

Whenever there's any activity in the log down here, and it's not in focus, this little dot will appear to encourage you to go ahead and click it to show that stuff has happened.

Let's hop over to the tests suites panel view — in here, we can either add to an existing suite, or create a suite.

Creating a suite is just like when creating a test. You click the plus symbol, give a name, and then that's it. We could just create a suite. That's it.

You can also add tests to it, rename it, delete it, or modify some specific settings. I'll cover settings in a later video. Don't worry about that yet.

We can rename this to something more useful like "login." Then what we can do is add tests, and then select the tests we want, and then that's it. Now it's part of the suite.

From within the suite view, you actually have the option to select a test and play just that test, or you can play all of the tests in the suite from within the IDE.

If we do that, it would open a new window, and run through each test one after another (e.g., in series). Then come back and then assuming the test passed, you'll end up back in this view.

If there was a failure, it would end up staying in the executing view, and then show you the failures in red. And which command within the test that failed would be red as well. Then you could always look at the log to see what happened too.

That's management of suites and tests.

Real quick I want to just show you if you wanted to add additional insertions, not from just the right click menu when recording, you can come in and add commands manually.

You can either add them at the bottom just by clicking after the last command, and then starting to fill in commands.

Or you can insert a command within the test anywhere you want. You would just click the commands roughly where you want to add a command, you'd click on one.

Then you right click, and then there's this whole right click menu here where you can actually cut, copy, paste, or delete individual steps in the test. You can then insert a new command. You can clear all the commands in this test and then do some other things.

We'll insert a new command. When you do that, it inserts a new command before the command that you had selected.

Then you can just start typing. For right now, we're going to put an assertion at the bottom here. You could assert a few different things. If you type, "assert," it does a fuzzy match, and then shows you the results of what else is available. You could assert that an element is present, not present, and the list goes on.

I encourage you to take a look at each of the assert commands.

As you click on one you can actually just come to the reference tab and look and see what it's requirements are, and a description of what it does.

Alternatively, you could actually go to the Selenium IDE docs. What we have is a command glossary of what each command does. You can see here in the table of contents on the right all of the assert commands. It's an easier central place where you can go to look for all that information.

Also, I mentioned in the previous video I'd cover what each of these buttons does. I'll do that real briefly here.

  • There's the ability to enable or disable a command. If you click that, it actually removes that command from being able to be executed in playback.

  • There's also the option to add some metadata. If a command clicks a link or a button that opens a new window, in order for Selenium IDE to know what that window is, that it needs to interact with, that information is captured automatically during recording. If you're actually constructing a test by hand, then you would want to come into this menu and enable it and specify all the information. There's description text to explain each of the bits for it.

  • There's the ability to select an element on the page that you want to interact with. You could type out a locator if you wanted to, or if you're adding the command by hand, you can just click this button and then select what in the page you want to interact with.

  • If there's already a locator and you want to see where on the page that locator is, you can just click this magnifying button and it will show you, and then it will highlight on the screen. Whereas this is the selection. It says, "Select an element," and then it shows you with highlighting which thing you're going to click on, and then fills in all of the information.

In the very first video, I mentioned smart locators are important. During recording, Selenium IDE captures multiple locators. During playback, if the primary locator is unsuccessful, all of the subsequent locators will be attempted, which actually gives quite a lot of resilience to test playback.

That's it; that's the basic overview of Selenium IDE from a management perspective.