运维系统巡检.py 2.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
import sys
import os

# 获取当前脚本的绝对路径
current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建预定系统的绝对路径
预定系统_path = os.path.abspath(os.path.join(current_dir, '..','..','..','..'))
# 添加路径
sys.path.append(预定系统_path)
# 导入模块
from 预定系统.Base.base import *

class Operation_maintenance_0001:
    tags = ['展厅巡检','运维系统巡检']

    def teststeps(self):
        wd = GSTORE['wd']

19
        SELENIUM_LOG_SCREEN(wd, "75%", "Exhibit_Inspect", "Operation_maintenance", "首页界面")
20 21 22 23
        safe_click((By.XPATH, "(//span[contains(text(),'进入系统')])[4]"), wd)
        sleep(4)
        # 检查会议室数据展示界面并截图
        INFO("请查看会议室的数据展示情况")
24
        SELENIUM_LOG_SCREEN(wd, "75%", "Exhibit_Inspect", "Operation_maintenance", "进入系统界面")
25 26 27 28 29

        INFO("请查看设备列表的连接状态")
        # 检查五大系统的设备连接状态并截图
        safe_click((By.XPATH, "//span[contains(text(),'设备列表')]"), wd)
        sleep(4)
30
        SELENIUM_LOG_SCREEN(wd, "75%", "Exhibit_Inspect", "Operation_maintenance", "设备连接状态")
31 32 33 34

        INFO("请查看视频系统设备的连接状态")
        safe_click((By.XPATH, "(//img)[11]"), wd)
        sleep(4)
35
        SELENIUM_LOG_SCREEN(wd, "75%", "Exhibit_Inspect", "Operation_maintenance", "视频系统")
36 37 38 39

        INFO("请查看音频系统设备的连接状态")
        safe_click((By.XPATH, "(//img)[12]"), wd)
        sleep(4)
40
        SELENIUM_LOG_SCREEN(wd, "75%", "Exhibit_Inspect", "Operation_maintenance", "音频系统")
41

42
        INFO("请查看控制系统设备的连接状态,查看左摄像头是否为掉线状态!!!")
43 44
        safe_click((By.XPATH, "(//img)[13]"),wd)
        sleep(4)
45
        SELENIUM_LOG_SCREEN(wd, "75%", "Exhibit_Inspect", "Operation_maintenance", "控制系统")
46 47 48 49

        INFO("请查看网络系统设备的连接状态")
        safe_click((By.XPATH, "(//img)[14]"),wd)
        sleep(4)
50
        SELENIUM_LOG_SCREEN(wd, "75%", "Exhibit_Inspect", "Operation_maintenance", "网络系统")
51 52 53 54

        INFO("请查看电源系统设备的连接状态")
        safe_click((By.XPATH, "(//img)[15]"),wd)
        sleep(4)
55
        SELENIUM_LOG_SCREEN(wd, "75%", "Exhibit_Inspect", "Operation_maintenance", "电源系统")
56 57 58 59

        INFO("请查看运维系统的告警数据展示")
        safe_click((By.XPATH, "//li[contains(text(),'数据展示')]"), wd)
        sleep(20)
60
        SELENIUM_LOG_SCREEN(wd, "75%", "Exhibit_Inspect", "Operation_maintenance", "告警数据展示")