How to execute a .py file with a class using .robot file or integrating it to robot framework?

33 views Asked by At

I need to execute the below code using robot framework .robot file help me to create keywords and other necessary steps

#launch_app.py


from pywinauto.timings import TimeoutError, wait_until
from pywinauto import application
from config import detransitPath
import time

app = None


class LaunchApp:

    def __init__(self,detransitPath):
        self.detransitPath = detransitPath
        
    def launchApp(self):
        global app
        app = application.Application(backend="uia").start(self.detransitPath)
        #wait_until(timeout=10, retry_interval=0.7, func=lambda: signinWindow.exists())

        from locators import signinWindow, signinButton, transitUI
        signinWindow.print_control_identifiers(depth=10)
        wait_until(timeout=10, retry_interval=0.7, func=lambda: signinWindow.exists())
        signinButton.click_input()
        
        wait_until(timeout=17, retry_interval=0.7, func=lambda: transitUI.exists())
0

There are 0 answers