base.click(
            [By.XPATH, '//*[@id="printContent"]/div[1]/div[2]/div/span[1]'])
        base.sendKeys([By.CLASS_NAME, "el-textarea__inner"], "同意同意同意")
        base.click([
            By.XPATH,
            '//*[@id="approvalDetail"]/div[2]/div/div[3]/span/button[2]/span'
        ])
        sleep(1)
        # 点击审批主题
        base.click([
            By.XPATH,
            '//*[@id="pane-first"]/div/div[1]/form/div[2]/div/div/div/input'
        ])
        # 选择我已审批
        sleep(1)
        base.click([By.XPATH, '/html/body/div[2]/div[1]/div[1]/ul/li[2]/span'])
        # 点击查询
        base.click([
            By.XPATH,
            '//*[@id="pane-first"]/div/div[1]/div/div[2]/button[1]/span'
        ])
        # self.driver.get_screenshot_as_file("E:\\screenshot\\审批项目.png")


if __name__ == "__main__":

    driver = webdriver.Chrome()
    LoginZhiXin(driver).login_zhixin("15733189935", "2222wwww")
    LoginZhiYou(driver).login_zhiyou()
    LoginZhiYouGuanLi(driver).login_zhiyou_guanli()
    ApprovalCompanyProject(driver).approval_company_project("张凯测试公司项目2.0")
from selenium import webdriver
from time import sleep
import sys
sys.path.append(r'C:\Users\LENOVO\Desktop\python\美腾\zhixin\login_zx')
from login__zhixin import LoginZhiXin
sys.path.append(r'C:\Users\LENOVO\Desktop\python\美腾\zhiyou\登录')
from login__zhiyou import LoginZhiYou

driver = webdriver.Chrome()
# driver.maximize_window()
LoginZhiXin(driver).login_zhixin("13820921009", "1111qqqq")
LoginZhiYou(driver).login_zhiyou()
driver.find_element_by_xpath('//*[@id="menu"]/li[2]').click()
sleep(1)
for num in range(1, 10):
    name5 = driver.find_element_by_xpath("//*[@id='temp']/div/div[" +
                                         str(num) +
                                         "]/div/div/div[2]/div[1]/p[1]").text
    # 选择项目主题
    qq = '测试临时项目1.1'
    if qq in name5:
        driver.find_element_by_xpath("//*[@id='temp']/div/div[" + str(num) +
                                     "]/div/div/div[2]/div[1]/p[1]").click()
sleep(1)
driver.find_element_by_xpath('//*[@id="addNew"]/div/div/div[1]/img').click()
sleep(1)
# 输入邮件主题、重要收件人、邮件内容、发送邮件
driver.find_element_by_xpath(
    '//*[@id="mail-chat"]/div[2]/div[1]/div[2]/div[1]/div[1]/div[2]/div[2]/div[2]/input'
).send_keys("11112222")
driver.find_element_by_xpath(
Beispiel #3
0
        ).click()
        # 选择智能工厂研发部
        sleep(1)
        self.driver.find_element_by_xpath(
            '/html/body/div[7]/div/div[2]/div/div[2]/div/ul/div[1]/li[1]/p'
        ).click()
        sleep(1)
        # 选择测试组
        self.driver.find_element_by_xpath(
            '/html/body/div[7]/div/div[2]/div/div[2]/div/ul/div[1]/li[6]/label/span[1]/span'
        ).click()
        # 点击确定
        sleep(1)
        self.driver.find_element_by_xpath(
            '/html/body/div[7]/div/div[3]/span/button[2]').click()
        # 点击提交
        sleep(1)
        self.driver.find_element_by_xpath(
            '//*[@id="el_main"]/div/div[2]/button[2]').click()


if __name__ == "__main__":

    driver = webdriver.Chrome()
    LoginZhiXin(driver).login_zhixin()
    sleep(1)
    LoginZhiYou(driver).login_zhiyou()
    sleep(1)
    LoginZhiYouGuanLi(driver).login_zhiyou_guanli()
    sleep(1)
    CreateCompanyProject(driver).create_company_project("测试公司项目1.221")