mirror of
https://github.com/status-im/status-desktop.git
synced 2025-03-01 23:11:09 +00:00
* test(pytest) The driver methods added. Wrappers for UI elements added. #67 * test(pytest) Squishserver added #68 * test(pytest) Attach/Detach AUT methods added #69 * test(pytest) Main window handler added #70 * test(pytest) Save screenshot on fail added #71 * test(pytest) Wait for squishserver added #71 * test(pytest) Setup Windows #71 * Generate new keys (#11804) * test(pytest) Image comparison methods added #76 * test(pytest) Tesseract methods added #77 * test(pytest) The Methods to search color on image added #80 * test(onboarding) Test on generation new keys added #75 * test(pytest) Handlers for OS Native File dialog added #81 * test(Onboarding) Test on Profile image added #83 * Allure and TestRail integration (#11806) * test(Allure) Steps descriptions added #72 * test(TestRail) Integration #72
23 lines
764 B
Python
23 lines
764 B
Python
import allure
|
|
|
|
import constants.commands
|
|
import driver
|
|
from gui.elements.qt.button import Button
|
|
from gui.elements.qt.text_edit import TextEdit
|
|
from gui.elements.qt.window import Window
|
|
from scripts.utils.system_path import SystemPath
|
|
|
|
|
|
class OpenFileDialog(Window):
|
|
|
|
def __init__(self):
|
|
super(OpenFileDialog, self).__init__('please_choose_an_image_QQuickWindow')
|
|
self._path_text_edit = TextEdit('titleBar_textInput_TextInputWithHandles')
|
|
self._open_button = Button('please_choose_an_image_Open_Button')
|
|
|
|
@allure.step('Open file')
|
|
def open_file(self, fp: SystemPath):
|
|
self._path_text_edit.text = str(fp)
|
|
driver.type(self._path_text_edit.object, f'<{constants.commands.RETURN}>')
|
|
self.wait_until_hidden()
|