Fixtures - Toseter/SeleniumRunner GitHub Wiki

Selenium runner supports fixtures.
Fixture is selense script that will run before/after running test/test suite.

To add fixtures in TestSuite use link tags

   <link rel="beforeSuite" href="fixture.f" />    
   <link rel="afterSuite" href="fixture.f" />

So fixture on link with rel "beforeSuite" will be executed before running Suite, and "afterSuite" – after running suite.

To add fixtures in Test use link tags

   <link rel="beforeTest" href="fixture.f" />    
   <link rel="afterTest" href="fixture.f" />

So fixture on link with rel "beforeTest" will be executed before running test, and "afterTest" – after running test.

Example fixture:

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link rel="selenium.base" href="http://www.google.ru/"/>
    <title>fixture</title>
</head>
    
<body>
    
<table cellpadding="1" cellspacing="1" border="1">
    <thead>
    <tr>
        <td rowspan="1" colspan="3">fixture</td>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>open</td>
        <td>/</td>
        <td></td>
    </tr>
    <tr>
        <td>type</td>
        <td>q</td>
        <td>selenium</td>
    </tr>
    <tr>
        <td>click</td>
        <td>btnG</td>
        <td></td>
    </tr>
    
    </tbody>
</table>
    
</body>
</html>
⚠️ **GitHub.com Fallback** ⚠️