# Generated by the windmill services transformer
from windmill.authoring import WindmillTestClient

def test_recordingSuite1():
    client = WindmillTestClient(__name__)

    client.open(url=u'http://127.0.0.1:8000/admin/')
    client.waits.forPageLoad(timeout=u'8000')
    client.waits.forElement(xpath=u"//div[@id='content-main']/div[2]/table/tbody/tr[1]/td[1]/a", timeout=u'8000')
    client.click(xpath=u"//div[@id='content-main']/div[2]/table/tbody/tr[1]/td[1]/a")
    client.waits.forPageLoad(timeout=u'20000')
    client.waits.forElement(timeout=u'8000', id=u'id_description')
    client.click(id=u'id_description')
    client.type(text=u'SubCA', id=u'id_description')
    client.type(text=u'SubCA', id=u'id_common_name')
    client.type(text=u'Bavaria', id=u'id_state')
    client.type(text=u'Munich', id=u'id_locality')
    client.type(text=u'My Company', id=u'id_organization')
    client.type(text=u'BackEnd', id=u'id_OU')
    client.type(text=u'daniel@linuxaddicted.de', id=u'id_email')
    client.type(text=u'122', id=u'id_valid_days')
    client.type(text=u'1234567890', id=u'id_passphrase')
    client.click(id=u'id_parent')
    client.select(option=u'', id=u'id_parent')
    client.click(value=u'1')
    client.click(id=u'id_parent_passphrase')
    client.type(text=u'1234567890', id=u'id_parent_passphrase')
    client.click(xpath=u"//form[@id='certificateauthority_form']/div[2]/div[2]/input[1]")
    client.waits.forPageLoad(timeout=u'20000')
    client.asserts.assertTextIn(xpath=u"//div[@id='container']/ul/li", validator=u'The certificate authority "SubCA" was added successfully.')

