Using images from dictionaries in unit tests
Hi,
Today I thought I should learn how to make unit tests. At current state I have written two different tests. One which contains the images direcly in the testfile and one which refers to the images as keys in a dictionary which is in another file.
Both tests are identical to the point where the images are stored. And none of them returns any Errors when doing a normal Run.
The problem is that only the test where the images is directly stored in the test are working.
How would I do in order to make the other test run aswell?
The script which got the images in a dictionary in another file is identical apart from where images are called. Like in the wait() below
In the dictionary test it looks like this: wait(imgSet.
Here is the code:
def setUp(self):
App.
wait(
def tearDown(self):
App.
wait("element on desktop")
def test_findGuiEle
if not exists(
print("Not focus") #if not print "Not focus"
if exists(
return True
elif not exists(
return False
print("Does not exists") #if not visible print "does not exist"
Feels like I have been trying everything. The only positive thing this day is the sunny weather. :-)
Hope the sun shine above your heads aswell!
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: