sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #07190
Re: [Question #179700]: Robot Framework: capture screen and move to a new location
Question #179700 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/179700
Status: Answered => Open
Peter Kim is still having a problem:
Hi RaiMan,
Thank you for your prompt answers.
I think that the problem is getBundlePath() when Sikuli is run with
Robot Framework.
Here is what my function looks like:
def v_wait_click(image):
if (v.exists(image,25)):
v.click(image)
else:
print "v_wait_click: capturing the screen"
captured_screen = capture(SCREEN)
print "v_wait_click: screen was captured at ", captured_screen
print "v_wait_click: getBundlePath() = ", getBundlePath()
print "v_wait_click: os.path.basename(captured_screen) = ", os.path.basename(captured_screen)
outfile = os.path.join(getBundlePath(), os.path.basename(captured_screen))
print "v_wait_click: moving capture screen ", captured_screen, " to ", outfile
shutil.move (captured_screen, outfile)
v.click(image)
Here is what Sikuli IDE printed out:
v_wait_click: capturing the screen
v_wait_click: screen was captured at C:\Users\pd.kim\AppData\Local\Temp\sikuli-scr-5383166600268765385.png
v_wait_click: getBundlePath() = C:\Sikuli\LU6200.sikuli
v_wait_click: os.path.basename(captured_screen) = sikuli-scr-5383166600268765385.png
v_wait_click: moving capture screen C:\Users\pd.kim\AppData\Local\Temp\sikuli-scr-5383166600268765385.png to C:\Sikuli\LU6200.sikuli\sikuli-scr-5383166600268765385.png
Here is what Sikuli + Robot Framework printed out:
- KEYWORD: LU6200.V Wait Click c:\Sikuli\LU6200.sikuli\SikuliIDE.png
Start / End / Elapsed: 20111124 11:09:41.057 / 20111124 11:10:07.008 / 00:00:25.951
11:10:06.898 INFO v_wait_click: capturing the screen
v_wait_click: screen was captured at C:\Users\pd.kim\AppData\Local\Temp\sikuli-scr-2623127815520719942.png
v_wait_click: getBundlePath() = None
v_wait_click: os.path.basename(captured_screen) = sikuli-scr-2623127815520719942.png
11:10:07.006 FAIL TypeError: len() of unsized object
So the question is why getBundlePath() returns None in Robot Framework.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.