I am trying to create another folder to store functions that will be called for test but I am unable to import it

Asked by Ali Ahmed on 2021-01-30

I am unable to import a sikuli module that I created so I could make a call to the functions in it but it's not able to import it.

This is the code that I am trying to import to test:

from sikuli import *

def navigateToScheduling():

    print("Click on Scheduling and wait for side menu to appear")
    click("SchedulingModuleButton.png")
    wait(2)
    while not exists("SchedulingCaptureScreensList.png"):
         click("SchedulingModuleButton.png")
         wait(2)

and I am trying to call this funciton in Test but it's not working. This is what in my test. The error I am getting is: ImportError ( No module named ScheduleModule )

import HTMLTestRunner
import unittest
import utils
import ScheduleModule

ScheduleModule.navigateToScheduling()

I was able to create a utils module and that one is working I am able to make a call to various functions from it. But I dont know why I can't with this one

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
Ali Ahmed
Solved:
2021-01-30
Last query:
2021-01-30
Last reply:
Ali Ahmed (ali13xii) said : #1

Nvm I was able to get it to work