Exemplo n.º 1
0
def fill_form_122(self, run_cnt):
    driver = self.driver
    driver.get(self.base_url + "/patent/pendpat/")
    driver.find_element_by_id("id_app_num").clear()
    driver.find_element_by_id("id_app_num").send_keys(pol_data.db_ois_num_gen())
    Select(driver.find_element_by_id("id_pat_type")).select_by_visible_text(u"ноу-хау")
    driver.find_element_by_css_selector("span.input-group-addon").click()
    driver.find_element_by_xpath("//table[@class='table-condensed']//tr[3]/td[5]").click()
    driver.find_element_by_id("id_name").clear()
    driver.find_element_by_id("id_name").send_keys(pol_data.db_fake_item_names())
    driver.find_element_by_link_text(u"Добавить правообладателя").click()
    driver.find_element_by_id("id_copyrighters-0-internal_copyrighter_0").clear()
    driver.find_element_by_id("id_copyrighters-0-internal_copyrighter_0").send_keys(pol_data.db_real_staff_gen())
    driver.find_element_by_css_selector("span.hilight").click()
    driver.find_element_by_link_text(u"Добавить правообладателя").click()
    Select(driver.find_element_by_id("id_copyrighters-1-copyrighter_type")).select_by_visible_text(u"организация")
    driver.find_element_by_id("id_copyrighters-1-organization_0").clear()
    driver.find_element_by_id("id_copyrighters-1-organization_0").send_keys(u"Спб")
    driver.find_element_by_css_selector("span.hilight").click()
    driver.find_element_by_link_text(u"Добавить автора").click()
    driver.find_element_by_id("id_authors-0-internal_author_0").clear()
    driver.find_element_by_id("id_authors-0-internal_author_0").send_keys(pol_data.db_real_staff_gen())
    driver.find_element_by_css_selector("span.hilight").click()
    driver.find_element_by_link_text(u"Добавить автора").click()
    Select(driver.find_element_by_id("id_authors-1-author_type")).select_by_visible_text(u"сотрудник другой организации")
    driver.find_element_by_id("id_authors-1-external_author").clear()
    driver.find_element_by_id("id_authors-1-external_author").send_keys(pol_data.db_fake_staff_gen())
    driver.find_element_by_id("id_authors-1-ea_organization_0").clear()
    driver.find_element_by_id("id_authors-1-ea_organization_0").send_keys(u"Спб")
    driver.find_element_by_css_selector("span.hilight").click()
    driver.find_element_by_name("submit").click()
Exemplo n.º 2
0
def fill_form_kb(self, itx):
    #itx=ix+1
    driver = self.driver
    driver.get(self.base_url + "/grant/part")
    driver.find_element_by_id("id_grant_0").clear()
    driver.find_element_by_id("id_grant_0").send_keys("CONC_15_07_14")
    driver.find_element_by_css_selector("span.hilight").click()

    driver.find_element_by_name("select").click()
    driver.find_element_by_id("id_project_name").clear()
    driver.find_element_by_id("id_project_name").send_keys("nazv_project")

    driver.find_element_by_id("id_project_abstract").clear()
    driver.find_element_by_id("id_project_abstract").send_keys(
        "anotation_proj")

    driver.find_element_by_id("id_degree").clear()
    driver.find_element_by_id("id_degree").send_keys("0,5")

    driver.find_element_by_link_text(u"Добавить соавтора").click()
    driver.find_element_by_id("id_internal-0-user_post_0").clear()
    driver.find_element_by_id("id_internal-0-user_post_0").send_keys(
        u"Гагарский Кирилл Алексеевич")
    driver.find_element_by_css_selector("span.hilight").click()

    driver.find_element_by_id("id_internal-0-degree").clear()
    driver.find_element_by_id("id_internal-0-degree").send_keys("0,25")

    driver.find_element_by_xpath(
        u"(//a[contains(text(),'Добавить соавтора')])[2]").click()
    driver.find_element_by_id("id_external-0-user_name").clear()
    driver.find_element_by_id("id_external-0-user_name").send_keys(
        pol_data.db_fake_staff_gen())

    driver.find_element_by_id("id_external-0-organization_0").clear()
    driver.find_element_by_id("id_external-0-organization_0").send_keys(
        u"СПбПУ")
    driver.find_element_by_css_selector("span.hilight").click()

    driver.find_element_by_id("id_external-0-degree").clear()
    driver.find_element_by_id("id_external-0-degree").send_keys("0,25")

    driver.find_element_by_name("submit").click()
Exemplo n.º 3
0
def fill_form_kb(self, itx):
	#itx=ix+1
	driver = self.driver
	driver.get(self.base_url + "/grant/part")
	driver.find_element_by_id("id_grant_0").clear()
	driver.find_element_by_id("id_grant_0").send_keys("CONC_15_07_14")
	driver.find_element_by_css_selector("span.hilight").click()

	driver.find_element_by_name("select").click()
	driver.find_element_by_id("id_project_name").clear()
	driver.find_element_by_id("id_project_name").send_keys("nazv_project")

	driver.find_element_by_id("id_project_abstract").clear()
	driver.find_element_by_id("id_project_abstract").send_keys("anotation_proj")

	driver.find_element_by_id("id_degree").clear()
	driver.find_element_by_id("id_degree").send_keys("0,5")

	driver.find_element_by_link_text(u"Добавить соавтора").click()
	driver.find_element_by_id("id_internal-0-user_post_0").clear()
	driver.find_element_by_id("id_internal-0-user_post_0").send_keys(u"Гагарский Кирилл Алексеевич")
	driver.find_element_by_css_selector("span.hilight").click()

	driver.find_element_by_id("id_internal-0-degree").clear()
	driver.find_element_by_id("id_internal-0-degree").send_keys("0,25")

	driver.find_element_by_xpath(u"(//a[contains(text(),'Добавить соавтора')])[2]").click()
	driver.find_element_by_id("id_external-0-user_name").clear()
	driver.find_element_by_id("id_external-0-user_name").send_keys(pol_data.db_fake_staff_gen())

	driver.find_element_by_id("id_external-0-organization_0").clear()
	driver.find_element_by_id("id_external-0-organization_0").send_keys(u"СПбПУ")
	driver.find_element_by_css_selector("span.hilight").click()

	driver.find_element_by_id("id_external-0-degree").clear()
	driver.find_element_by_id("id_external-0-degree").send_keys("0,25")

	driver.find_element_by_name("submit").click()