def __init__(self):
     self.log = logging.getLogger(__name__)
     self.log.info("AppSetting init --")
     self.hexMeetHJTWindow = HjtWindowSingleton().getHJTWindow()
     self.setting_page = self.hexMeetHJTWindow.GroupControl(
         searchDepth=1, AutomationId="CHomeDlg.m_pWgtContext").GroupControl(
             searchDepth=2,
             AutomationId=
             "CHomeDlg.m_pWgtContext.m_pStackedWgtContent.CSettingsForm")
示例#2
0
class UserLogin:
    def __init__(self):
        self.hjt_windows = HjtWindowSingleton().getHJTWindow()
        self.login_windows = auto.WindowControl(
            searchDepth=1, ClassName="ev_app::views::CLoginDlg")
        self.login_page = self.login_windows.CustomControl(
            searchDepth=1, AutomationId="CLoginDlg.m_pStackedWgtContent")

    def go_to_login_page(self):
        self.hjt_windows.GroupControl(searchDepth=1, AutomationId="CHomeDlg.m_pWgtOperationBar")\
            .ImageControl(searchDepth=3, AutomationId="CHomeDlg.m_pWgtOperationBar.m_pWgtLoginUserInfo.horizontalWidget.m_pLblAvatar").Click()
        self.hjt_windows.WindowControl(
            searchDepth=1,
            ClassName="ev_app::views::CMyInfoDlg").ButtonControl(
                searchDepth=2, Name="退出登录").Click()
        self.login_windows.ButtonControl(searchDepth=2, Name="返回").Click()
        self.login_page.ButtonControl(
            searchDepth=3,
            AutomationId=
            "CLoginDlg.m_pStackedWgtContent.CLoginOptionsForm.verticalWidget.m_pBtnLogin"
        ).Click()

    def fill_in_server_address(self, server_address):
        server_address_edit = self.login_page.EditControl(
            searchDepth=3,
            AutomationId=
            "CLoginDlg.m_pStackedWgtContent.CLoginInfoForm.verticalWidget.m_pEditServer"
        )
        server_address_edit.SendKeys("{BACK}" * 40)
        server_address_edit.SendKeys(server_address)

    def fill_in_account(self, accout):
        accout_edit = self.login_page.EditControl(
            searchDepth=3,
            AutomationId=
            "CLoginDlg.m_pStackedWgtContent.CLoginInfoForm.verticalWidget.m_pEditAccount"
        )
        accout_edit.SendKeys("{BACK}" * 40)
        accout_edit.SendKeys(accout)

    def fill_in_password(self, password):
        password_edit = self.login_page.EditControl(
            searchDepth=3,
            AutomationId=
            "CLoginDlg.m_pStackedWgtContent.CLoginInfoForm.verticalWidget.m_pEditPasswd"
        )
        password_edit.SendKeys("{BACK}" * 40)
        password_edit.SendKeys(password)

    def user_login_commit(self):
        self.login_page.ButtonControl(searchDepth=3, Name="登录").Click()

    def login_fail_commit(self):
        self.login_windows.WindowControl(
            searchDepth=1, ClassName="ev_app::views::AlertDlg").ButtonControl(
                searchDepth=3, Name="确定").Click()
class Contact:
    def __init__(self):
        self.log = logging.getLogger(__name__)
        self.log.info("Contact init --")
        self.hexMeetHJTWindow = HjtWindowSingleton().getHJTWindow()
        self.contact_page = self.hexMeetHJTWindow.GroupControl(
            searchDepth=1, AutomationId="CHomeDlg.m_pWgtContext")

    def call_from_favorite(self, name):
        self.log.info("call_from_favorite")
        self.hexMeetHJTWindow.GroupControl(
            searchDepth=1, AutomationId="CHomeDlg.m_pWgtOperationBar"
        ).ListControl(
            searchDepth=2,
            AutomationId=
            "CHomeDlg.m_pWgtOperationBar.verticalWidget_4.m_pLvMenus").Click()
        self.contact_page.DataItemControl(searchDepth=15, Name=name).Click()
        sleep(1)
        self.contact_page.ButtonControl(searchDepth=11, Name="视频").Click()
        sleep(20)
        operate_in_meeting = OperateInMeeting()
        operate_in_meeting.hangup_call()

    def call_from_organization(self, name):
        self.log.info("call_from_organization")
        self.hexMeetHJTWindow.GroupControl(
            searchDepth=1, AutomationId="CHomeDlg.m_pWgtOperationBar"
        ).ListControl(
            searchDepth=2,
            AutomationId=
            "CHomeDlg.m_pWgtOperationBar.verticalWidget_4.m_pLvMenus").Click()
        self.contact_page.TabItemControl(searchDepth=14, Name=" 组织结构").Click()
        sleep(1)
        self.contact_page.EditControl(searchDepth=13,
                                      Name="输入用户/终端名称").SendKeys(name)
        self.contact_page.DataItemControl(searchDepth=15, Name=name).Click()
        sleep(1)
        self.contact_page.ButtonControl(searchDepth=11, Name="视频").Click()
        sleep(20)
        operate_in_meeting = OperateInMeeting()
        operate_in_meeting.hangup_call()
class AppVersion:
    def __init__(self):
        self.hexMeetHJTWindow = HjtWindowSingleton().getHJTWindow()
        self.app_setting = AppSetting()

    def getAppVersion(self):
        self.app_setting.go_to_setting_page()
        sleep(1)
        setting_form_page = self.hexMeetHJTWindow.GroupControl(
            searchDepth=1, AutomationId="CHomeDlg.m_pWgtContext").GroupControl(
                searchDepth=2,
                AutomationId=
                "CHomeDlg.m_pWgtContext.m_pStackedWgtContent.CSettingsForm")
        setting_form_page.ListItemControl(searchDepth=3, Name="关于").Click()
        sleep(1)
        version = setting_form_page.TextControl(
            searchDepth=7,
            AutomationId=
            "CHomeDlg.m_pWgtContext.m_pStackedWgtContent.CSettingsForm.twgtSettingsPages.qt_tabwidget_stackedwidget.tabSettingsAbout.scrollArea.qt_scrollarea_viewport.scrollAreaWidgetContents.m_pLabVersion"
        ).Name
        return version.split(":", 1)[1]
import pytest
import allure
from time import sleep
from HJT_pkg.HjtWindowsSingleton import HjtWindowSingleton
from HJT_pkg.ContactPageObject import Contact

hjt_singleton = HjtWindowSingleton()
contact = Contact()


def setup_module():
    sleep(10)
    hjt_singleton.start_hjt()


def teardown_module():
    hjt_singleton.close_hjt()


@pytest.mark.flaky(rerun=1, rerun_delay=2)
@allure.parent_suite("通讯录")
@allure.feature("测试HJT APP的通讯录操作")
@allure.suite("呼叫常用联系人")
@allure.story("呼叫常用联系人")
def test_call_from_favorite():
    sleep(5)
    contact.call_from_favorite("RongliangVE210")


@pytest.mark.flaky(rerun=1, rerun_delay=2)
@allure.parent_suite("通讯录")
 def __init__(self):
     self.log = logging.getLogger(__name__)
     self.log.info("Contact init --")
     self.hexMeetHJTWindow = HjtWindowSingleton().getHJTWindow()
     self.contact_page = self.hexMeetHJTWindow.GroupControl(
         searchDepth=1, AutomationId="CHomeDlg.m_pWgtContext")
示例#7
0
 def __init__(self):
     self.hjt_windows = HjtWindowSingleton().getHJTWindow()
     self.login_windows = auto.WindowControl(searchDepth=1, ClassName="ev_app::views::CLoginDlg")
     self.login_page = self.login_windows.CustomControl(searchDepth=1, AutomationId="CLoginDlg.m_pStackedWgtContent")
示例#8
0
class UnRegisterCall:
    def __init__(self):
        self.hjt_windows = HjtWindowSingleton().getHJTWindow()
        self.login_windows = auto.WindowControl(searchDepth=1, ClassName="ev_app::views::CLoginDlg")
        self.login_page = self.login_windows.CustomControl(searchDepth=1, AutomationId="CLoginDlg.m_pStackedWgtContent")

    def go_to_unregister_call_page(self):
        self.hjt_windows.GroupControl(searchDepth=1, AutomationId="CHomeDlg.m_pWgtOperationBar") \
            .ImageControl(searchDepth=3, AutomationId="CHomeDlg.m_pWgtOperationBar.m_pWgtLoginUserInfo.horizontalWidget.m_pLblAvatar").Click()
        self.hjt_windows.WindowControl(searchDepth=1, ClassName="ev_app::views::CMyInfoDlg").ButtonControl(searchDepth=2, Name="退出登录").Click()
        self.login_windows.ButtonControl(searchDepth=2, Name="返回").Click()
        self.login_page.ButtonControl(searchDepth=3, Name="加入会议").Click()

    def fill_in_server_address(self, server_address):
        server_address_edit = self.login_page.EditControl(searchDepth=3, AutomationId="CLoginDlg.m_pStackedWgtContent.CLoginJoinConfForm.verticalWidget.m_pEditServer")
        server_address_edit.SendKeys("{BACK}" * 40)
        server_address_edit.SendKeys(server_address)

    def fill_in_conference_id(self, conference_id):
        """暂时改变不了值"""
        self.login_windows.TextControl(searchDepth=2, Name="加入会议").Click()
        x, y = auto.GetCursorPos()
        # Normal PC auto.Click(x + 55, y + 95)
        # Hihg DPI
        auto.Click(x + 45, y + 75)
        auto.SendKeys("{BACK}" * 40)
        auto.SendKeys(conference_id)
        # conference_id_edit = self.login_page.ComboBoxControl(searchDepth=3, AutomationId="CLoginDlg.m_pStackedWgtContent.CLoginJoinConfForm.verticalWidget.m_pCmbBoxConfNumber")
        # conference_id_edit.SendKeys("{BACK}" * 40)
        # conference_id_edit.SendKeys(conference_id)

    def append_password(self, password):
        self.login_windows.TextControl(searchDepth=2, Name="加入会议").Click()
        x, y = auto.GetCursorPos()
        # Normal PC auto.Click(x + 55, y + 95)
        # Hihg DPI
        auto.Click(x + 45, y + 75)
        auto.SendKeys(password)

    def fill_in_display_name(self, display_name):
        display_name_edit = self.login_page.EditControl(searchDepth=3, AutomationId="CLoginDlg.m_pStackedWgtContent.CLoginJoinConfForm.verticalWidget.m_pEditDisplayName")
        display_name_edit.SendKeys("{BACK}" * 40)
        display_name_edit.SendKeys(display_name)

    def fill_in_password(self, password):
        fill_in_password = auto.WindowControl(searchInterval=1, ClassName="ev_app::views::CInputPasswordWidget").GroupControl(searchDepth=1, AutomationId="CInputPasswordWidget.verticalWidget_2") \
            .EditControl(searchDepth=1, AutomationId="CInputPasswordWidget.verticalWidget_2.m_pInputPasswordEdit")
        fill_in_password.Click()
        fill_in_password.SendKeys(password + "{ENTER}")

    def change_microphone_setting(self):
        self.login_page.CheckBoxControl(searchDepth=3, Name="关闭麦克风").Click()

    def change_camera_setting(self):
        self.login_page.CheckBoxControl(searchDepth=3, Name="关闭摄像头").Click()

    def user_join_commit(self):
        self.login_page.ButtonControl(searchDepth=3, Name="加入").Click()

    def login_fail_commit(self):
        self.login_windows.WindowControl(searchDepth=1, ClassName="ev_app::views::AlertDlg").ButtonControl(searchDepth=3, Name="确定").Click()

    def fill_in_conference_password(self, password):
        auto.WindowControl(searchDepth=1, ClassName="ev_app::views::CInputPasswordWidget").EditControl(searchDepth=2, AutomationId="CInputPasswordWidget.verticalWidget_2.m_pInputPasswordEdit") \
            .SendKeys(password + "{ENTER}")

    def login_from_unregister_call_page(self):
        self.login_windows.ButtonControl(searchDepth=2, Name="返回").Click()
        sleep(1)
        self.login_windows.ButtonControl(searchDepth=4, Name="登录").Click()
        sleep(1)
        self.login_windows.ButtonControl(searchDepth=4, Name="登录").Click()

    def close_hjt(self):
        self.login_windows.GroupControl(searchDepth=1, AutomationId="CLoginDlg.m_pWgtTitlebar").ButtonControl(searchDepth=1, AutomationId="CLoginDlg.m_pWgtTitlebar.m_pBtnClose").Click()
class AppSetting:
    def __init__(self):
        self.log = logging.getLogger(__name__)
        self.log.info("AppSetting init --")
        self.hexMeetHJTWindow = HjtWindowSingleton().getHJTWindow()
        self.setting_page = self.hexMeetHJTWindow.GroupControl(
            searchDepth=1, AutomationId="CHomeDlg.m_pWgtContext").GroupControl(
                searchDepth=2,
                AutomationId=
                "CHomeDlg.m_pWgtContext.m_pStackedWgtContent.CSettingsForm")

    def go_to_setting_page(self):
        self.log.info("go_to_setting_page")
        self.hexMeetHJTWindow.GroupControl(
            searchDepth=1,
            AutomationId="CHomeDlg.m_pWgtOperationBar").ListControl(
                searchDepth=2,
                ClassName="ev_app::custom_controls::CHomeMenuListView").Click(
                )
        x, y = auto.GetCursorPos()
        auto.Click(x, y + 70)

    def chang_bandwidth(self, value):
        """
        values are
        384K,512K,768K,1M,1.5M,2M,3M,4M
        """
        self.log.info("chang_bandwidth")
        self.go_to_setting_page()
        sleep(3)
        self.setting_page.TextControl(searchDepth=9, Name="呼叫速率").Click()
        x, y = auto.GetCursorPos()
        auto.Click(x, y + 40)
        self.setting_page.ListItemControl(searchDepth=11, Name=value).Click()

    def chang_language(self, language):
        """
        languages are
        English,简体中文
        """
        self.log.info("chang_language")
        self.go_to_setting_page()
        sleep(3)
        if self.setting_page.TextControl(searchDepth=9, Name="语言").Exists():
            self.setting_page.TextControl(searchDepth=9, Name="语言").Click()
        else:
            self.setting_page.TextControl(searchDepth=9,
                                          Name="Language").Click()

        x, y = auto.GetCursorPos()
        auto.Click(x, y + 40)
        self.setting_page.ListItemControl(searchDepth=11,
                                          Name=language).Click()

    def change_snapshot_path(self):
        self.log.info("change_snapshot_path")
        sleep(3)
        self.go_to_setting_page()
        self.setting_page.ButtonControl(
            searchDepth=9,
            AutomationId=
            "CHomeDlg.m_pWgtContext.m_pStackedWgtContent.CSettingsForm.twgtSettingsPages.qt_tabwidget_stackedwidget"
            ".tabSettingsGeneral.m_pScrollGeneral.qt_scrollarea_viewport.scaSettingsGeneral.scorllGeneralWidght"
            ".m_pWgtSnapshotPathPanel.m_pBtnChangeSnapshotPath").Click()
        sleep(1)
        self.hexMeetHJTWindow.WindowControl(searchDepth=1,
                                            Name="请选择截图文件存放位置:").ButtonControl(
                                                searchDepth=1,
                                                Name="选择文件夹").Click()

    def change_auto_login(self):
        self.log.info("change_auto_login")
        self.go_to_setting_page()
        self.setting_page.CheckBoxControl(searchDepth=9, Name="自动登录").Click()

    def change_auto_answer(self):
        self.log.info("change_auto_answer")
        self.go_to_setting_page()
        self.setting_page.CheckBoxControl(searchDepth=9, Name="自动应答").Click()

    def change_auto_save_white_board_when_exit(self):
        self.log.info("change_auto_save_white_board_when_exit")
        self.go_to_setting_page()
        self.setting_page.CheckBoxControl(searchDepth=9,
                                          Name="关闭白板时,自动保存").Click()

    def change_auto_hide_site_name(self):
        self.log.info("change_auto_hide_site_name")
        self.go_to_setting_page()
        self.setting_page.CheckBoxControl(searchDepth=11,
                                          Name="自动隐藏与会者名称显示").Click()

    def change_disable_prompt(self):
        self.log.info("change_disable_prompt")
        self.go_to_setting_page()
        self.setting_page.CheckBoxControl(searchDepth=10, Name="关闭提示").Click()

    def change_to_full_mode_meeting(self):
        self.log.info("change_to_full_mode_meeting")
        self.go_to_setting_page()
        self.setting_page.TextControl(searchDepth=9, Name="应用").Click()
        auto.WheelDown(5)
        self.setting_page.CheckBoxControl(searchDepth=9,
                                          Name="进入会议时全屏显示").Click()
示例#10
0
 def __init__(self):
     self.hexMeetHJTWindow = HjtWindowSingleton().getHJTWindow()
     self.app_setting = AppSetting()
示例#11
0
 def __init__(self):
     self.hexMeetHJTWindow = HjtWindowSingleton().getHJTWindow()
     self.reserve_meeting_page = self.hexMeetHJTWindow.GroupControl(searchDepth=1,
                                                                    AutomationId="CHomeDlg.m_pWgtContext")
示例#12
0
class ReserveMeeting:

    def __init__(self):
        self.hexMeetHJTWindow = HjtWindowSingleton().getHJTWindow()
        self.reserve_meeting_page = self.hexMeetHJTWindow.GroupControl(searchDepth=1,
                                                                       AutomationId="CHomeDlg.m_pWgtContext")

    def go_to_meeting_page(self):
        self.hexMeetHJTWindow.GroupControl(searchDepth=1, AutomationId="CHomeDlg.m_pWgtOperationBar").ListControl(
            searchDepth=2, ClassName="ev_app::custom_controls::CHomeMenuListView").Click()
        x, y = auto.GetCursorPos()
        # auto.Click(x, y - 70)
        # high DPI
        auto.Click(x, y - 55)

    def reserve_meeting_from_panel(self):
        self.go_to_meeting_page()
        self.hexMeetHJTWindow.GroupControl(searchDepth=1, AutomationId="CHomeDlg.m_pWgtContext").TextControl(
            searchDepth=9, Name="预约会议").Click()

    def choose_date(self):
        self.reserve_meeting_page.EditControl(searchDepth=10, Name="请选择开始日期").Click()

    def choose_time(self):
        self.reserve_meeting_page.EditControl(searchDepth=10, Name="请选择开始时间").Click()

    def choose_now(self):
        self.reserve_meeting_page.CheckBoxControl(searchDepth=11, Name="现在").Click()

    def choose_duration(self):
        self.reserve_meeting_page.EditControl(searchDepth=10, Name="请选择时长").Click()

    def fill_password(self, password):
        self.reserve_meeting_page.SpinnerControl(searchDepth=10, Name="12 位以内数字").SendKeys(password)

    def fill_meeting_notes(self, notes):
        self.reserve_meeting_page.EditControl(searchDepth=10, Name="请输入会议备注").SendKeys(notes)

    def choose_participants(self, name):
        self.reserve_meeting_page.ButtonControl(searchDepth=9, Name="+ 选取与会者").Click()
        participants_page = self.reserve_meeting_page.WindowControl(searchDepth=8, Name="选取与会者")

        participants_page.TabItemControl(searchDepth=5, Name="组织结构").Click()
        participants_page.EditControl(searchDepth=4, Name="请选择").Click()
        sleep(1)
        self.hexMeetHJTWindow.GroupControl(searchDepth=1, AutomationId="CHomeDlg.m_pWgtContext").TextControl(
            searchDepth=10, Name="全部类型").Click()
        sleep(1)
        participants_page.EditControl(searchDepth=3, Name="输入用户/终端名称").SendKeys(name)
        sleep(1)
        participants_page.DataItemControl(searchDepth=7, Name=name).Click()
        participants_page.ButtonControl(searchDepth=2, Name="确定").Click()

    def use_random_number_as_meeting_room(self):
        self.reserve_meeting_page.CheckBoxControl(searchDepth=12, Name="使用随机号码作为会议号码").Click()

    def allow_anonymous_user(self):
        self.reserve_meeting_page.EditControl(searchDepth=11, Name="请选择").Click()
        sleep(1)
        self.reserve_meeting_page.TextControl(searchDepth=10, Name="允许匿名").Click()

    def allow_only_company_user(self):
        self.reserve_meeting_page.EditControl(searchDepth=11, Name="请选择").Click()
        sleep(1)
        self.reserve_meeting_page.TextControl(searchDepth=10, Name="只允许公司成员").Click()

    def allow_only_invited_user(self):
        self.reserve_meeting_page.EditControl(searchDepth=11, Name="请选择").Click()
        sleep(1)
        self.reserve_meeting_page.TextControl(searchDepth=10, Name="只允许邀请者").Click()

    def mute_when_join_meeting(self):
        self.reserve_meeting_page.CheckBoxControl(searchDepth=11, Name="加入会议时静音").Click()

    def reserve_confirm(self):
        self.reserve_meeting_page.ButtonControl(searchDepth=10, Name="预约").Click()

    def delete_reserve_meeting(self):
        self.reserve_meeting_page.HyperlinkControl(searchDepth=10, Name="删除").Click()
        sleep(2)
        self.reserve_meeting_page.ButtonControl(searchDepth=9, Name="确定").Click()

    def edit_reserve_meeting(self):
        self.reserve_meeting_page.HyperlinkControl(searchDepth=10, Name="编辑").Click()

    def return_from_edit_reserve(self):
        self.reserve_meeting_page.ButtonControl(searchDepth=7, Name="< 返回").Click()

    def share_reserve_meeting(self):
        self.reserve_meeting_page.HyperlinkControl(searchDepth=10, Name="分享").Click()

    def return_from_share(self):
        self.reserve_meeting_page.ButtonControl(searchDepth=7, Name="< 返回").Click()

    def now_meeting_confirm(self):
        auto.WheelDown(8)
        self.reserve_meeting_page.ButtonControl(searchDepth=10, Name="立即召开").Click()

    def join_now_meeting(self):
        self.reserve_meeting_page.HyperlinkControl(searchDepth=9, Name="加入会议").Click()
        sleep(1)
        self.hexMeetHJTWindow.WindowControl(searchDepth=1, ClassName="ev_app::views::CJoinConfDlg").ButtonControl(
            searchInterval=4, Name="加入").Click()

    def control_now_meeting(self):
        self.reserve_meeting_page.HyperlinkControl(searchDepth=9, Name="控制会议").Click()

    def invite_others_control_now_meeting(self, name):
        sleep(1)
        self.reserve_meeting_page.ButtonControl(searchDepth=8, Name="邀请").Click()
        sleep(1)
        self.reserve_meeting_page.EditControl(searchDepth=11, Name="输入用户/终端名称").SendKeys(name)
        sleep(1)
        self.reserve_meeting_page.ButtonControl(searchDepth=7, Name="< 返回").Click()
        sleep(1)
        self.reserve_meeting_page.ButtonControl(searchDepth=7, Name="< 返回").Click()

    def terminate_now_meeting(self):
        self.reserve_meeting_page.HyperlinkControl(searchDepth=9, Name="结束").Click()
        sleep(1)
        self.reserve_meeting_page.ButtonControl(searchDepth=8, Name="确定").Click()

    def clear_reserved_meeting(self):
        while self.reserve_meeting_page.HyperlinkControl(searchDepth=9, Name="结束").Exists(1):
            self.reserve_meeting_page.HyperlinkControl(searchDepth=9, Name="结束").Click()
            sleep(1)
            self.reserve_meeting_page.ButtonControl(searchDepth=8, Name="确定").Click()
            sleep(3)
 def __init__(self):
     # print("__init__")
     self.hexMeetHJTWindow = HjtWindowSingleton().getHJTWindow()
class JoinAMeeting:
    def __init__(self):
        # print("__init__")
        self.hexMeetHJTWindow = HjtWindowSingleton().getHJTWindow()

    def __join_from_panel(self, mute="false"):
        # print("_clickJoinAMeetingFromPanel_")
        self.go_to_meeting_page()
        sleep(10)
        self.hexMeetHJTWindow.GroupControl(
            searchDepth=1, AutomationId="CHomeDlg.m_pWgtContext").TextControl(
                searchDepth=9, Name="加入会议").Click()
        sleep(2)
        self.mute_audio(mute)
        self.mute_camera(mute)
        sleep(1)
        self.hexMeetHJTWindow.WindowControl(searchDepth=1, AutomationId="CHomeDlg.CJoinConfDlg").GroupControl(
            searchDepth=1, AutomationId="CHomeDlg.CJoinConfDlg.m_pWgtContent") \
            .ButtonControl(searchDepth=3,
                           AutomationId="CHomeDlg.CJoinConfDlg.m_pWgtContent.CLoginJoinConfForm.verticalWidget.m_pBtnJoinConf").Click()

    def go_to_meeting_page(self):
        self.hexMeetHJTWindow.GroupControl(
            searchDepth=1,
            AutomationId="CHomeDlg.m_pWgtOperationBar").ListControl(
                searchDepth=2,
                ClassName="ev_app::custom_controls::CHomeMenuListView").Click(
                )
        x, y = auto.GetCursorPos()
        auto.Click(x, y - 70)

    def mute_audio(self, enable="true"):
        mute_audio_checkbox = self.hexMeetHJTWindow.WindowControl(searchDepth=1, AutomationId="CHomeDlg.CJoinConfDlg").GroupControl(
            searchDepth=1, AutomationId="CHomeDlg.CJoinConfDlg.m_pWgtContent") \
            .CheckBoxControl(searchDepth=3,
                           AutomationId="CHomeDlg.CJoinConfDlg.m_pWgtContent.CLoginJoinConfForm.verticalWidget.m_pChkBoxDisableMic")
        if mute_audio_checkbox.GetTogglePattern(
        ).ToggleState == 0 and enable == "true":
            mute_audio_checkbox.Click()
        if mute_audio_checkbox.GetTogglePattern(
        ).ToggleState == 1 and enable == "false":
            mute_audio_checkbox.Click()

    def mute_camera(self, enable="true"):
        mute_camera_checkbox = self.hexMeetHJTWindow.WindowControl(searchDepth=1, AutomationId="CHomeDlg.CJoinConfDlg").GroupControl(
            searchDepth=1, AutomationId="CHomeDlg.CJoinConfDlg.m_pWgtContent") \
            .CheckBoxControl(searchDepth=3,
                             AutomationId="CHomeDlg.CJoinConfDlg.m_pWgtContent.CLoginJoinConfForm.verticalWidget.m_pChkBoxDisableCamera")
        if mute_camera_checkbox.GetTogglePattern(
        ).ToggleState == 0 and enable == "true":
            mute_camera_checkbox.Click()
        if mute_camera_checkbox.GetTogglePattern(
        ).ToggleState == 1 and enable == "false":
            mute_camera_checkbox.Click()

    def join_a_meeting_from_top_menu(self, mute="false"):
        # print("_clickJoinAMeetingFromTopMenu_")
        self.go_to_meeting_page()
        sleep(10)
        self.hexMeetHJTWindow.GroupControl(
            searchDepth=1,
            AutomationId="CHomeDlg.m_pWgtTitleBar").ButtonControl(
                searchDepth=1,
                AutomationId="CHomeDlg.m_pWgtTitleBar.m_pBtnJoinConf").Click()
        sleep(2)
        self.mute_audio(mute)
        self.mute_camera(mute)
        sleep(1)
        self.hexMeetHJTWindow.WindowControl(searchDepth=1, AutomationId="CHomeDlg.CJoinConfDlg").GroupControl(
            searchDepth=1, AutomationId="CHomeDlg.CJoinConfDlg.m_pWgtContent") \
            .ButtonControl(searchDepth=3,
                           AutomationId="CHomeDlg.CJoinConfDlg.m_pWgtContent.CLoginJoinConfForm.verticalWidget.m_pBtnJoinConf").Click()

    def join_a_meeting_from_panel(self, mute="false"):
        self.__join_from_panel(mute)

    def join_a_meeting_from_panel_with_password(self, password):
        # print("_clickJoinAMeetingFromPanel_")
        self.__join_from_panel()
        sleep(2)
        input_password_form = auto.WindowControl(
            searchDepth=1, ClassName="ev_app::views::CInputPasswordWidget")
        input_password_form.EditControl(
            searchDepth=2,
            AutomationId=
            "CInputPasswordWidget.verticalWidget_2.m_pInputPasswordEdit"
        ).Click()
        input_password_form.EditControl(
            searchDepth=2,
            AutomationId=
            "CInputPasswordWidget.verticalWidget_2.m_pInputPasswordEdit"
        ).SendKeys(password + "{ENTER}")

    def join_a_meeting_from_panel_with_password_one_line(
            self, password, mute="false"):
        self.go_to_meeting_page()
        sleep(10)
        self.hexMeetHJTWindow.GroupControl(
            searchDepth=1, AutomationId="CHomeDlg.m_pWgtContext").TextControl(
                searchDepth=9, Name="加入会议").Click()
        sleep(1)
        self.hexMeetHJTWindow.WindowControl(
            searchDepth=1,
            ClassName="ev_app::views::CJoinConfDlg").TextControl(
                searchDepth=2, Name="加入会议").Click()
        self.mute_audio(mute)
        self.mute_camera(mute)
        # 通过移动鼠标到会议号码后面并添加密码
        x, y = auto.GetCursorPos()
        # auto.Click(x+50, y+50)
        # hig DPI
        auto.Click(x + 40, y + 40)
        auto.SendKeys("*" + password + "{ENTER}")

    def is_in_meeting(self):
        return auto.WindowControl(searchDepth=1, ClassName="ev_app::views::CLayoutBackgroundDlg").WindowControl(
            searchDepth=1, ClassName="ev_app::views::CLayoutCoverDlg") \
            .GroupControl(searchDepth=2,
                          AutomationId="CLayoutBackgroundDlg.CLayoutPeopleSettingDlg.CLayoutCoverDlg.CLayoutCellCoverDlg.m_pWgtContent").Exists()