作者: 用户黎 时间: 2018-7-5 12:32
from selenium import webdriver
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoAlertPresentException
import time
import bs4
import csv
import re
def SQR_TiJiao(value):
Driver.switch_to_default_content()
Driver.find_element_by_xpath('/html/body/div[3]/div[1]/div[1]/a[1]/span').click()
Driver.switch_to.frame("ifSYS_FORM")
if value !="":
Driver.find_element_by_xpath('//*[@id="nnf-send-confirm"]/table/tbody/tr[2]/td/div/div/span/textarea').send_keys(value)
else:
if is_element_exist('//*[@id="nnf-send-confirm"]/table/tbody/tr[2]/td/div/div/span/input[@value=""]'):
Driver.find_element_by_xpath('//*[@id="nnf-send-confirm"]/table/tbody/tr[2]/td/div/div/span/input[@value=""]').send_keys('摘要未自动生成')
Driver.find_element_by_xpath('//*[@id="nnf-send-confirm-buttons"]/a[1]').click()