# Marionette, Act I: We've got Firefox on a string

DevFeed: [Marionette, Act I: We've got Firefox on a string](<https://devfeed.tech/articles/marionette-act-i-we-ve-got-firefox-on-a-string-20245.md>)

Original publisher: [Read original article](<http://anjana.dev/blog/marionette-act-i-automation/>)

Author: Anjana Sofia Vakil (contact@anjana.dev)

Published: 2016-07-08T00:00:00Z

Content type: article

Language: en

Sources: [Mozilla Automation](<https://devfeed.tech/sources/mozilla-automation.md>)

Topics: [Firefox](<https://devfeed.tech/topics/firefox.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [browser](<https://devfeed.tech/topics/browser.md>), [Server](<https://devfeed.tech/topics/server.md>), [client](<https://devfeed.tech/topics/client.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [Python](<https://devfeed.tech/topics/python.md>), [Mozilla](<https://devfeed.tech/topics/mozilla.md>)

Tags: [automated](<https://devfeed.tech/tags/automated.md>), [browser](<https://devfeed.tech/tags/browser.md>), [components](<https://devfeed.tech/tags/components.md>), [firefox](<https://devfeed.tech/tags/firefox.md>), [forms](<https://devfeed.tech/tags/forms.md>), [harness](<https://devfeed.tech/tags/harness.md>), [marionette](<https://devfeed.tech/tags/marionette.md>), [mozilla](<https://devfeed.tech/tags/mozilla.md>), [python](<https://devfeed.tech/tags/python.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [server](<https://devfeed.tech/tags/server.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

This first article in a two-part series introduces Marionette and explains how its server and client components automatically control Firefox for browser testing. It covers testing Firefox's interface and web content, including links, forms, and video, and previews a later discussion of the Marionette test harness and runner.

## Source excerpt

As you may already know, I'm spending my summer interning with Mozilla's Enginering Productivity team through the Outreachy program. Specifically, the project I'm working on is called Test-driven Refactoring of Marionette's Python Test Runner. But what exactly does that mean? What is Marionette, and what does it have to do with testing? In this two-part series, I'd like to share a bit of what I've learned about the Marionette project, and how its various components help us test Firefox by allowing us to automatically control the browser from within. Today, in Act I, I'll give an overview of how the Marionette server and client make the browser our puppet. Later on, in Act II, I'll describe how the Marionette test harness and runner make automated testing a breeze, and let you in on the work I'm doing on the Marionette test runner for my internship. And since we're talking about puppets, you can bet there's going to be a hell of a lot of Being John Malkovich references. Consider yourself warned! How do you test a browser? On the one hand, you probably want to make sure that the browser's interface, or chrome, is working as expected; that users can, say, open and close tabs and windows, type into the search bar, change preferences and so on. But you probably also want to test how the browser displays the actual web pages, or content, that you're trying to, well, browse; that users can do things like click on links, interact with forms, or play video clips from their favorite movies. Because let's be honest, that's like 96% of the point of the internet right there, no? These two parts, chrome and content, are the main things the browser has to get right. So how do you test them? Well, you could launch the browser application, type "Being John Malkovich" into the search bar and hit enter, check that a page of search results appears, click on a YouTube link and check that it takes you to a new page and starts playing a video, type "I ❤ Charlie Kaufman and Spike Jonze" i