Create the project folder
A project is simply a folder containing the project resources. I think the best projects have funny names or use code words. I'll use Giraffe because my son thinks giraffes are very funny.
Open the project
Start MuseIDE and open the project folderThe project navigator appears on the left and lists all the project resources, grouped by resource type. There are no resources in the project yet. This tutorial will cover most of the resource types, but if you just can't wait, you can read about some of them over on the Muse Test Framework wiki. MuseIDE is built on the open-source Muse Test Framework.
Setup WebDriver(s)
MuseIDE uses Selenium / WebDriver to control a browser. Most of the browsers have a separate program (the driver) that is responsible for launching the browser and facilitating communication between Muse tests and the browser. The drivers can be anywhere on your computer, but putting them within the project makes the project more portable.
Muse has an extension feature that makes it easy to install some of the more popular drivers. Press the Extensions… button:
This will open the Extension Manager:
Press the '+' button for the extension you want to install. Then use a filesystem browser to locate the installed files for the next step. They will typically be installed in a subfolder of the webdrivers folder of your project. Looking at the folders below the webdrivers folder, locate the drivers that were installed. You will need to know the relative path when configuring the providers later. See the picture below for an example of the Firefox driver (GeckoDriver).
Note: You could also download the executable driver files manually and put them in your project (e.g. in the webdrivers folder). Hint: Search the Internet for "{browsername} webdriver download" to find the drivers.
Configure a browser
The first project resource we will create is a browser specification, or simply browser. This tells Muse what kind of browser to start. I will create a browser and set the resource id to chrome-any:
Next, I'll configure this browser with the browser name (chrome) and allow any version on any OS:
Later, when we reference project resource browser-any, it will mean that we want any version of the Chrome browser that the system can find.
Configure a browser provider
When we want to open a browser in a test, we need to provide two separate specifications. The first is the type of browser, which we just did with chrome-any. The second describes how/where to start the browser. There are two choices: local and remote. For running large test suites with multiple versions of browsers, I would want to connect to a remote browser provided by my corporate Selenium Grid or a 3rd-party grid such as Sauce Labs or Browser Stack.
When building tests, I want to run locally so I can see what the browser is doing. I add a browser provider with id local-provider:
Each provider can have multiple sub-providers. This allows a local browser provider to provide different types of browsers. For now, I only add a local Chrome provider:
And finally, I configure the provider with the path to the driver. I've configured this with a relative path to make it more portable. I must also tell Muse which OS this driver is for.
With a project created, browser and browser provider configured, I am now ready to build my first test.
Return to Tutorials page