[Sikuli-driver] [Question #293512]: Adding Robotframework to SikuliX
New question #293512 on Sikuli: https://answers.launchpad.net/sikuli/+question/293512 Hello, I am trying to get SikuliX to 'play with' Robot Framework as outlines here: http://www.sikulix.com/support.html I am running with: - Win 10 64-bit - SikuliX 1.1.0 (2015-10-05_(17:07) - Installed with option 1 and 2 ticked - Python 2.7.5 - I downloaded the Robot folder via the link about and placed the files in '%appdata%/Roaming/SikuliX/Lib/robot/' What I am trying to do: Run a simple test case that will output some reporting to test that this is working. Getting a report output at the end of the test is the end goal here. What I have tried: 1) I have tried making a test script in Sikuli that contains the code found in testRun.py (via the link above), but I get these errors: [error] JythonSupport: exec: returns: Traceback (most recent call last): File "", line 1, in ImportError: No module named robot [error] JythonSupport: exec: returns: Traceback (most recent call last): File "", line 1, in NameError: name 'robot' is not defined 2) I have tried running a Robot Framwork test script for the calculator, outlined here: https://bitbucket.org/robotframework/robotdemo/src/51f472687b6a46e88b7c179423f0f336e19497fc/data_driven.robot?at=master&fileviewer=file-view-default When I do, I get this error: [error] script [ Testrobot ] stopped with error in line 33 at column 22 [error] SyntaxError ( "no viable alternative at character '$'", ) ^^I have no idea what that means 3) I've tried making sure all single or double or brackets or any sort are all closed or the correct kind - same errors. I am really lost at this point. Does anyone know what I am doing wrong? Or, does anyone just have a simple test case I can copy/paste into Sikuli so I can run it and see the HTML report files that are output? -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #293512]: Adding Robotframework to SikuliX
Question #293512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/293512 Status: Open => Answered RaiMan proposed the following answer: I will try to sort it out within the next 24 hours: -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #293512]: Adding Robotframework to SikuliX
Question #293512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/293512 Ryan posted a new comment: Thanks RaiMan - any help is appreciated by you or anyone. I am really liking Sikuli. The RunServer option worked like a charm! -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #293512]: Adding Robotframework to SikuliX
Question #293512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/293512 Ryan posted a new comment: I should add that I am new to coding of any sort, so sorry if I ask questions that are super obvious. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #293512]: Adding Robotframework to SikuliX
Question #293512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/293512 Karl proposed the following answer: Should robot be put in %appdata%/Roaming/SikuliX/Lib/site-packages/? -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #293512]: Adding Robotframework to SikuliX
Question #293512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/293512 Description changed to: Hello, I am trying to get SikuliX to 'play with' Robot Framework as outlines here: http://www.sikulix.com/support.html I am running with: - Win 10 64-bit - SikuliX 1.1.0 (2015-10-05_(17:07) - Installed with option 1 and 2 ticked - Python 2.7.5 - I downloaded the Robot folder via the link about and placed the files in '%appdata%/SikuliX/Lib/robot/' What I am trying to do: Run a simple test case that will output some reporting to test that this is working. Getting a report output at the end of the test is the end goal here. What I have tried: 1) I have tried making a test script in Sikuli that contains the code found in testRun.py (via the link above), but I get these errors: [error] JythonSupport: exec: returns: Traceback (most recent call last): File "", line 1, in ImportError: No module named robot [error] JythonSupport: exec: returns: Traceback (most recent call last): File "", line 1, in NameError: name 'robot' is not defined 2) I have tried running a Robot Framwork test script for the calculator, outlined here: https://bitbucket.org/robotframework/robotdemo/src/51f472687b6a46e88b7c179423f0f336e19497fc/data_driven.robot?at=master&fileviewer =file-view-default When I do, I get this error: [error] script [ Testrobot ] stopped with error in line 33 at column 22 [error] SyntaxError ( "no viable alternative at character '$'", ) ^^I have no idea what that means 3) I've tried making sure all single or double or brackets or any sort are all closed or the correct kind - same errors. I am really lost at this point. Does anyone know what I am doing wrong? Or, does anyone just have a simple test case I can copy/paste into Sikuli so I can run it and see the HTML report files that are output? -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #293512]: Adding Robotframework to SikuliX
Question #293512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/293512 Ryan posted a new comment: Think support page on the Sikuli site says "As a workaround, you have to have a copy of the robot module (the folder robot containing the file __init__.py) in the SikulixAppData/Lib folder (about SikulixAppData see tab QuickStart and create it, if it does not exists yet)." Checking the QuickStart page, it says the 'SikuliAppData' location on windows is where the %AppData% path takes you - which is 'C:\Users\[user]\AppData\Roaming' for me I made a 'Lib' folder inside the 'SikuliX' folder and placed the 'robot' folder within the 'Lib' folder. So, I mistyped above. I have my robot folder in this location: '%appdata%/SikuliX/Lib/robot/' Fixing OP. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #293512]: Adding Robotframework to SikuliX
Question #293512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/293512 RaiMan proposed the following answer: I have to admit, that there where offending bugs in the import support of SikuliX. They are fixed now. Available with the next nightly 1.1.1 (hope tonight). this works: - the upper part (multiline comment) contains the Robot script - the lower part (class LoginLibrary) defines the keywords ... packed together in some testrobot.sikuli runScript(""" robot *** Variables *** ${USERNAME} demo ${PASSWORD} mode ${TESTSITE} http://test.sikuli.de *** Settings *** Library ./inline/LoginLibrary Test Setupstart firefox and goto testsite${TESTSITE} Test Teardown stop firefox *** Test Cases *** User can log in with correct user and password Attempt to Login with Credentials${USERNAME}${PASSWORD} Status Should BeAccepted User cannot log in with invalid user or bad password Attempt to Login with Credentialsbettywrong Status Should BeDenied """) from sikuli import * class LoginLibrary(object): def start_firefox_and_goto_testsite(self, page): popup("start_firefox_and_goto_testsite") def stop_firefox(self): popup("stop_firefox") def attempt_to_login_with_credentials(self, username, password): popup("attempt_to_login_with_credentials") def status_should_be(self, expected): popup("status_should_be") -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #293512]: Adding Robotframework to SikuliX
Question #293512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/293512 Ryan posted a new comment: Oooo, nice to hear it wasn't just me not doing something obvious :) And thanks for looking into this and fixing it. I didn't see a nightly build that was built on the Night Build page. Before I dive in and try to figure out how to build from the raw bits, I'll see if a build is built tomorrow. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #293512]: Adding Robotframework to SikuliX
Question #293512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/293512 Status: Answered => Solved Ryan confirmed that the question is solved: Hi RaiMan (or anyone else who is curious, I thought I would share the steps I needed to take to get robot working now that a new build has been kicked off. - I had to download the new nightly build of 1.1.1 (2016-05-19) - I nuked my old SikuliX install and reinstalled the one from 05-19 - I downloaded the Robot zip file from here: http://download.sikuli.de/robot.zip - I unzipped that zip file into %AppData%/SikuliX/Lib - I pasted the test robot testcase directly into a new script in SikuliX from here: http://sikulix-2014.readthedocs.io/en/latest/scenarios.html#using-robotframework The script ran and I see all the expected files - including the report files! WooOOO! The reason I had to download the robot.zip file was because SikuliX was complaining, when I ran the script, before getting the zip, that a platform.py file was missing. Diffing the zip file against what SikuliX installs by default to the Lib/robot dir - the zip came in at a few K lighter, but contained ~4 extra files. Now all I need to do is dive into how to tweak the report/script to my liking. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #293512]: Adding Robotframework to SikuliX
Question #293512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/293512 Ryan posted a new comment: I should add that when I ran the script a 2nd time the .robot directory (that was created in the 1st run) was auto-deleted and the script complained it couldn't find any files. Another run of the script created all the files again and outputted everything. I am not certain if this test script is supposed to do anything (as in actually launching firefox) because right now it is only popping up some messages with an OK button. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #293512]: Adding Robotframework to SikuliX
Question #293512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/293512 Ryan posted a new comment: I think I figured out how to fix the '.robot' directory deleting itself. I did not have 'from sikuli import *' in my script before the LoginLibrary class section. I added that and now it seems to run each time. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #293512]: Adding Robotframework to SikuliX
Question #293512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/293512 RaiMan posted a new comment: with the latest nightly from today (2016-05-20) the RobotFramework support should work according to the docs: http://sikulix-2014.readthedocs.io/en/latest/scenarios.html#using-robotframework - no need for the extra steps as mentioned in comment #8 and #10 anymore - when the script ends, the RFW report is automatically opened in your standard browser. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp