How to export Selenium tests and creating one more test

Description

Collection: Change Management and Version ControlChapter: How To Manage Non-Exportable Configuration Changes

Transcript

To export this test, I wanted to show you one more tool that's available with Selenium, which is that you can right click on any item in the page, and then show all available commands. Or, we've just recorded what we've done in the browser so we haven't had to know any of the commands. This is a great way to figure out about what can be recorded.

Now so far we've been working with flat HTML pages, but from time to time, you may need to record a macro that requires an ajax type interface or an overlay like the one we did before. In in those cases, we can't just automate the process of creating our tests. We actually need to go in and manually make some adjustments to it in order for it to work properly.

And this list should give you some hints about what to do next if you're stuck in a test that's not finishing. You can also click any of these items to add them to the test. So if I clicked this, you see that it gets added here.

I'm going to go ahead and delete it. Ok, now the whole point of us recording this was to be able to share it with others. So, let's go through the process of exporting this.

What you want to do when Selenium is selected here as a window, is go to "File, and then "Export Test Case As", and we'll select "HTML". Go ahead and navigate to your website folder and then in the "assets" folder, we'll create a new folder called "selenium" where we'll put these tests. Again, depending on your work flow.

you may have this "assets" folder within your Drupal directory. Or you may have it as a separate repository. And again, this folder contains everything that's not part of your code base, but is useful to have in "Version Control".

I'm going to click on "New Folder, selenium, and then Create". Ok, we're in the folder and we're going to go ahead and save this as "create-about-us-page dot html. Now we don't necessarily have to have the extension for this to work, but it helps disambiguate things when it comes to importing into Selenium because Selenium actually exports in several different formats.

So now, I'm going to go ahead and click "Save". And now if we jump back ...

In this series we uncover how to use powerful tools to speed up and stabilize the Drupal development process. We begin with a thorough walk-through of Git, the version control system. After we cover how to patch modules and upgrade Drupal from one minor version to another, we demonstrate how to use the Features module to version control components of Drupal that aren't typically available to version control. Finally, we wrap up with how to integrate Drush - a powerful command line tool for Drupal - into your workflow to speed up the process of doing everything we discussed earlier in the series.

Some of the key points we'll be covering include:

How to use the command line

How to work with the Features module to capture important database changes and make deployment easier.

How to use Git for version control

Best practices for working on a Drupal team

Who this collection is for

This video collection is mainly for developers who want to improve their deployment strategies and learn how to work on a shared Drupal code base with other developers. However, even if you are not a developer, our coverage of using Features and version control is extremely valuable for deploying Drupal sites and sharing reusable components between projects.

Prerequisites

Even if you are not a developer, you will be able to follow with most of this collection. When we talk about code we do not go into detail about the basic components of the code, so you may want to brush up on some coding basics in the "PHP Programming Basics" collection.

It looks like there might be an issue playing videos in this browser. We're working on better cross-brower experience, but in the meantime please try the latest Chrome or Firefox browsers. Or, you may be able to watch the video directly without progress tracking or transcript: