Anastasiya 41d431c136 chore: add object names to beta consent popup and test mode env variable condition (#308)
* chore: add object names to beta popup

* chore: add check for env variable
2023-11-16 13:48:17 +03:00

23 lines
791 B
Python

import allure
from gui.components.base_popup import BasePopup
from gui.elements.button import Button
from gui.elements.check_box import CheckBox
from gui.elements.object import QObject
class BetaConsentPopup(QObject):
def __init__(self):
self._agree_to_use_checkbox = CheckBox('agreeToUse_StatusCheckBox')
self._ready_to_use_checkbox = CheckBox('readyToUse_StatusCheckBox')
self._ready_to_use_button = Button('i_m_ready_to_use_Status_Desktop_Beta_StatusButton')
super(BetaConsentPopup, self).__init__('betaConsent_StatusModal')
@allure.step('Confirm all')
def confirm(self):
self._agree_to_use_checkbox.set(True)
self._ready_to_use_checkbox.set(True)
self._ready_to_use_button.click()
self.wait_until_hidden()