Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.35 KB

writing-new-drivers.rst

File metadata and controls

43 lines (28 loc) · 1.35 KB

Writing new splinter drivers

The process of creating a new splinter browser is really simple: you just need to implement a TestCase (extending tests.base. BaseBrowserTests) and make all tests green. For example:

Imagine you're creating the Columbia driver, you would add the test_columbia.py file containing some code like...

python

from splinter import Browser
from tests.base import BaseBrowserTests

class ColumbiaTest(BaseBrowserTests):

    @classmethod
    def setUpClass(cls):
        cls.browser = Browser('columbia')

    # ...

Now, to make the test green, you need to implement methods provided by the DriverAPI and the ElementAPI.

Use make test to run the tests:

bash

$ make test which=tests/test_columbia.py