Question #293226 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293226
Eugene S proposed the following answer:
Assume the below code is stored in file named "testFile.py"
import sys
path1 = sys.argv[1]
path2 = sys.argv[2]
def comparePaths(arg1, arg2):
return arg1 == arg2
Question #293226 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293226
Joe Loyzaga posted a new comment:
If you could expand on how to code it being used on command line then
I'm pretty sure you've answered the question
--
You received this question notification because your
Question #293226 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293226
Eugene S proposed the following answer:
I meant something this:
def comparePaths(arg1, arg2):
return arg1 == arg2
def someFunction(arg1, arg2):
#call comparePath() function from here when needed
Question #293226 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293226
Joe Loyzaga posted a new comment:
can you outline the best practice by showing me the code? don't
understnad waht you mean...
--
You received this question notification because your team Sikuli Drivers
is
Question #293226 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293226
Eugene S proposed the following answer:
Generally, what you ask can look like this (if I understand your
question correctly):
path1 = "C:\\temp"
path2 = "C:\\temp"
compareResult = path1 == path2
def
Question #293226 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293226
Joe Loyzaga posted a new comment:
your last comment makes sense but if I call this as a function and I send 3
args - 2 as the file paths and the third one as the result of the compare
1. what would the
Question #293226 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293226
Eugene S posted a new comment:
I'm sorry but I think I lost you here as I am not sure what exactly are
you asking.
--
You received this question notification because your team Sikuli Drivers
is an answer
Question #293226 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293226
Joe Loyzaga posted a new comment:
I want to run it as part of a test automation test stream where I have a
list od image paths that I send to sikuli as above and write pass or
fail in the same list alongside
Question #293226 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293226
Eugene S proposed the following answer:
I am not sure I understand. In the above way you can use the result of
the evaluation "path1 == path2" as you wish as it return True or False.
So you can assign it to
Question #293226 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293226
Joe Loyzaga posted a new comment:
I'd like to return the result to the python program that calls it providing the
input paths(2) and result(1)
Is that possible?
--
You received this question notification
Question #293226 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293226
Status: Needs information => Answered
Eugene S proposed the following answer:
So something like this?
path1 = raw_input('Enter path 1: ')
path2 = raw_input('Enter path 2: ')
print path1 == path2
--
Question #293226 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293226
Joe Loyzaga posted a new comment:
yes input the path to the images
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.
Question #293226 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293226
Eugene S requested more information:
Do you mean prompts for user input?
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.
Question #293226 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293226
Status: Open => Needs information
Eugene S requested more information:
Do you mean prompts for user input?
--
You received this question notification because your team Sikuli Drivers
is an answer
New question #293226 on Sikuli:
https://answers.launchpad.net/sikuli/+question/293226
I'd like to know if I can create a sikuli test that prompts for 2 image paths
and compares if they are the same
Then I'd like to call that via python
possible?
Joe
--
You received this question notification
15 matches
Mail list logo