# Create and import a scenario A scenario is a saved sequence of browser actions that represents how a visitor uses your website. Paste a Playwright script or set one up by hand. ## The scenario’s starting point and destination {#plan} A scenario has a starting page, a sequence of actions and a destination. For example, a storefront scenario might begin at the catalogue and follow the “Canvas backpack” link to its product page, without adding anything to the cart. The labels in the scenario need to match those on your site. Each hostname opened by a navigation step needs [domain verification](https://userlimit.com/documentation/get-started/verify-domain.md). ## How scripts become steps {#boundary} UserLimit converts supported source calls into saved steps rather than executing the script as a Playwright program. As a result, assertions, some waits and unawaited actions may be omitted even when an import succeeds. The [Playwright compatibility reference](https://userlimit.com/documentation/reference/playwright-compatibility.md) explains these differences. ## Ways to create a scenario {#author} Scenarios can be created from a pasted Playwright script or through **Manual setup**. The assistant buttons open an external assistant; UserLimit does not include a built-in recorder. An assistant prompt can include your page URLs, visible labels and a description of the scenario, along with these constraints: *Produce one linear browser scenario for the pages and visible labels I supply. Use only operations in UserLimit’s compatibility reference. Do not add assertions, loops, branches, helpers, external requests or invented selectors. Stop at the stated destination. Include no credentials or personal data.* Generated scripts may still contain unsupported calls. The converted steps show which actions UserLimit will run. ## From script to saved actions {#import} This example opens a catalogue and follows a product link. To use it, replace the placeholder URL with your own verified URL and “Canvas backpack” with the label on your site: ~~~javascript await page.goto('https://your-verified-domain.invalid/catalogue'); await page.getByRole('link', { name: 'Canvas backpack', exact: true }).click(); ~~~ | Source | Converted action | | --- | --- | | await page.goto(…) | Open the supplied catalogue URL. | | await page.getByRole('link', { name: 'Canvas backpack', exact: true }).click() | Click the matching link, using the converted role selector. | After the script has been pasted and named, selecting **Create scenario** saves its converted actions. This example produces one Open step followed by one Click, using the URL and selector from the source. If an expected action is missing, the compatibility reference explains which calls can be converted. The saved steps can be adjusted in the editor and stored with **Save changes**. Editing them does not rewrite the original source. By contrast, submitting a replacement script through **Replace steps** replaces the saved action list with a new conversion. ## Reliable selectors {#maintain} A specific role and visible label, or a stable test ID, helps a scenario find the intended element. Broad selectors can select the first matching element without reporting ambiguity. Changes to the scenario or website may require validation again. Conversion errors identify the affected line; further guidance is available in [troubleshooting](https://userlimit.com/documentation/help/troubleshooting.md). ## Related guide {#next-step} [Validate and fix the scenario](https://userlimit.com/documentation/journeys/validate.md)