Ejemplo n.º 1
0
 def __init__(self):
     L = Login()
     L.login()
     self.d = L.d
     Log().info("点击MEC管理")
     WebDriverWait(self.d, 60, 1).until(lambda ele: self.d.find_element_by_xpath('//*[@id="index"]/div[2]/div[1]/div/div/ul/li[1]/ul/li[3]'))
     self.d.find_element_by_xpath('//*[@id="index"]/div[2]/div[1]/div/div/ul/li[1]/ul/li[3]').click()
     sleep(1)
Ejemplo n.º 2
0
 def __init__(self):
     L = Login()
     L.login()
     self.d = L.d
     self.d.maximize_window()
     Log().info("点击数据模版管理")
     WebDriverWait(self.d, 60, 1).until(lambda ele: self.d.find_element_by_css_selector('#index > div.second-container > div:nth-child(1) > div > div > ul > li:nth-child(3) > div'))
     self.d.find_element_by_css_selector('#index > div.second-container > div:nth-child(1) > div > div > ul > li:nth-child(3) > div').click()
     sleep(2)
     Log().info("点击场景")
     self.d.find_element_by_css_selector("#index > div.second-container > div:nth-child(1) > div > div > ul > li:nth-child(3) > ul > li:nth-child(3)").click()
Ejemplo n.º 3
0
 def __init__(self):
     L = Login()
     L.login()
     self.d = L.d
     self.d.maximize_window()
     Log().info("点击终端用户")
     WebDriverWait(
         self.d, 30, 0.5).until(lambda ele: self.d.find_element_by_xpath(
             '//*[@id="index"]/div[2]/div[1]/div/div/ul/li[1]/ul/li[2]'))
     self.d.find_element_by_xpath(
         '//*[@id="index"]/div[2]/div[1]/div/div/ul/li[1]/ul/li[2]').click(
         )
Ejemplo n.º 4
0
 def __init__(self):
     L = Login()
     L.login()
     self.d = L.d
     self.d.maximize_window()
     Log().info("点击数据模版管理")
     WebDriverWait(self.d, 60, 1).until(lambda ele: self.d.find_element_by_css_selector('#index > div.second-container > div:nth-child(1) > div > div > ul > li:nth-child(3) > div'))
     self.d.find_element_by_css_selector('#index > div.second-container > div:nth-child(1) > div > div > ul > li:nth-child(3) > div').click()
     sleep(2)
     Log().info("点击业务管理")
     self.d.find_element_by_xpath('//*[@id="index"]/div[2]/div[1]/div/div/ul/li[3]/ul/li[4]').click()
     sleep(1)
Ejemplo n.º 5
0
 def __init__(self):
     L = Login()
     L.login()
     self.d = L.d
     Log().info("点击系统功能")
     self.d.find_element_by_xpath(
         '//*[@id="index"]/div[2]/div[1]/div/div/ul/li[4]/div/i[2]').click(
         )
     sleep(1)
     self.d.find_element_by_xpath(
         '//*[@id="index"]/div[2]/div[1]/div/div/ul/li[4]/ul/li').click()
     sleep(1)
Ejemplo n.º 6
0
 def Logout(self):#管理员登录退出
     L = Login()
     L.login()
     self.d = L.d
     ActionChains(self.d).move_to_element(self.d.find_element_by_xpath('/html/body/div[1]/div/div[1]/section/div[2]/div/span/span')).perform()
     sleep(1)
     WebDriverWait(self.d, 10, 1).until(lambda ele: self.d.find_element_by_xpath('/html/body/ul/li'))
     self.d.find_element_by_xpath('/html/body/ul/li').click()
     sleep(1)
     t= self.d.find_element_by_xpath('/html/body/div/div/div[1]/div').text
     print(t)
     if "登录Login" in t:
         print("测试成功")
Ejemplo n.º 7
0
 def __init__(self):
     L = Login()
     L.login()
     self.d = L.d
     WebDriverWait(
         self.d, 30, 1).until(lambda ele: self.d.find_element_by_xpath(
             '/html/body/div/div/div[2]/div[1]/div/div/ul/li[2]/div'))
     self.d.find_element_by_xpath(
         '/html/body/div/div/div[2]/div[1]/div/div/ul/li[2]/div').click()
     sleep(1)
     self.d.find_element_by_xpath(
         '/html/body/div/div/div[2]/div[1]/div/div/ul/li[2]/ul/li').click()
     sleep(1)
     self.d.find_element_by_xpath(
         '/html/body/div/div/div[2]/div[2]/div/div/div[3]/div/div[2]/div/a'
     ).click()
     sleep(2)
Ejemplo n.º 8
0
 def __init__(self):
     L = Login()
     L.login()
     self.d = L.d
     self.d.maximize_window()