Пример #1
0
 def setUp(self):
     self.driver = login_in_out.login()
     self.driver.implicitly_wait(10)
     self.verificationErrors = []
     self.accept_next_alert = True
     self.key=''
     #进入卡口系统
     driver=self.driver
     s.findId(driver,'menu_1304261304150253833622fa401af96b').click()
     time.sleep(1)
         #进入子模块
     s.findXpath(driver,'//*[@id="13050315032667198043cea8b460eacd"]/a').click()
         #进入content-frame
     driver.switch_to.frame('content-frame')
     time.sleep(2)
Пример #2
0
 def setUp(self):
     self.driver = login_in_out.login()
     self.driver.implicitly_wait(10)
     # self.driver.set_page_load_timeout(20)
     self.verificationErrors = []
     self.accept_next_alert = True
     self.key1 = u"测试文件服务器001"  #服务器名称--添加和删除设备名称
     self.key2 = u'测试文件服务器002'
     self.ip = '192.169.20.11'
     driver = self.driver
     #进入卡口系统
     s.findId(driver, 'menu_1304261304150253833622fa401af96b').click()
     time.sleep(2)
     # driver.switch_to_window(driver.window_handles[0])
     #进入子模块
     s.findXpath(driver,
                 '//*[@id="13050315032667198043cea8b460eacd"]/a').click()
     #进入content-frame
     driver.switch_to.frame('content-frame')
     time.sleep(2)
Пример #3
0
 def setUp(self):
     self.driver = login_in_out.login()
     self.driver.implicitly_wait(10)
     self.verificationErrors = []
     self.accept_next_alert = True
     #进入卡口系统
     driver = self.driver
     s.findId(driver, 'menu_1304261304150253833622fa401af96b').click()
     time.sleep(1)
     #进入子模块
     s.findXpath(driver,
                 '//*[@id="13050614093381218f13d4006428bc9e"]/a').click()
     #进入content-frame
     driver.switch_to.frame('content-frame')
     time.sleep(2)
     self.key1 = u'设备功能零零幺'
     self.key2 = u'设备功能零零贰'
     folders = s.findsClassName(driver, 'ico_close')
     for i in folders:
         ActionChains(driver).double_click(i).perform()
         time.sleep(2)
Пример #4
0
 def setUp(self):
     self.driver = login_in_out.login()
     self.driver.implicitly_wait(10)
     self.verificationErrors = []
     self.accept_next_alert = True
Пример #5
0
#coding=utf-8
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
import unittest, time, re, sys, io, string
defaultencoding = 'utf-8'
if sys.getdefaultencoding() != defaultencoding:
    reload(sys)
    sys.setdefaultencoding(defaultencoding)
sys.path.append('E:\\atom\\Python\\itmsv1\\unit')
import find, login_in_out, sj_IP, sj_8str, sj_hz, sj_3
s = find
driver = login_in_out.login()
#进入卡口系统
s.findXpath(driver,
            '//*[@id="menu_1304261304150253833622fa401af96b"]/a').click()
s.findId(driver, 'menu_1304261304150253833622fa401af96b').click()
time.sleep(2)
#进入卡口系统-实时监控-报警颜色
s.findXpath(driver, '//*[@id="131128083220030196117fcf823f3758"]/a').click()
s.jietu(driver)
#选择颜色——保存
"""

"""

driver.quit()