Exemple #1
0
 def setUpClass(self):
     self.driver = browser()
     self.dr = Basic(self.driver)
     self.btn = Button(self.dr)
     self.flow = Flow(self.dr)
     self.tp = folwType(os.path.join(DATA_PATH, 'yx_flow.xlsx'), sheet=1)
     self.pact_num = None
Exemple #2
0
 def setUpClass(self):
     self.driver = browser()
     self.dr = Basic(self.driver)
     self.btn = Button(self.dr)
     self.flow = Flow(self.dr)
Exemple #3
0
        # driver.click('css', '[data-id="10302"]')
        driver.click('css', '[class="cascade-confirm"]')
        driver.input('name', 'capandproname', '能力' + NOW + random_str(1, 2))
        driver.input('name', 'chargeunit', '台')
        driver.input('name', 'price', random.randint(100, 1000000))
        driver.input('name', 'certificate_id1',
                     self.Type(random.randint(1, 7))['certificate_id1'])
        time.sleep(1)
        driver.click('id', 'clipBtn')
        driver.input('id', 'editor', random_str(22, 88))
        driver.clear('name', 'address')
        driver.input('name', 'address', '北京')
        driver.click('id', 'editor')
        driver.click('id', 'inq-publish')
        Button(driver).surebtn()


if __name__ == '__main__':
    driver = browser()
    dr = Basic(driver)
    url = Config().get('CAPACITY_RELEASE_URL')
    dr.get_url(url)
    username = '******'
    password = '******'
    Login().login(dr, username, password)
    CapacityRelease().page(dr)
    for i in range(20):
        dr.click('id', 'addBtn')
        dr.jump_off()
        CapacityRelease().page(dr)