Re: [Sikuli-driver] [Question #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)

2019-02-08 Thread Melvin Raymond
Question #678427 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678427

Summary changed to:
Mojave : SikuliX IDE :  I need to create a Keyword for invoking my app  with 
Robotramework (from the SikuliX IDE)

-- 
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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)

2019-02-11 Thread Melvin Raymond
Question #678427 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678427

Melvin Raymond gave more information on the question:
I was able to invoke my app using this chunk of code which a developer
gave me. I will attempt to see if I can get the Robot Framework to use
it with a Keyword somehow.

#!/usr/bin/python

import subprocess
subprocess.call(["/usr/bin/open", "-a", "Labquest Viewer"])


Click to expand inline (7 lines)

3:08 PM
chmod 0777 thing.py
3:08 PM
./thing.py

-- 
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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)

2019-02-11 Thread RaiMan
Question #678427 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678427

Status: Open => Answered

RaiMan proposed the following answer:
All you need to learn how to implement your own keywords see here:
https://sikulix-2014.readthedocs.io/en/latest/scenarios.html#using-robotframework

start with the inline class definition and then you might store the
class file outside, to use it more than once in different tests.

In the keyword def just use the normal SikuliX Python scripting (class
App in this case).

-- 
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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)

2019-02-11 Thread Melvin Raymond
Question #678427 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678427

Status: Answered => Open

Melvin Raymond is still having a problem:
I don't seem to have a grip on using the syntax for that class App. This
is the last one I tried. It's one of many attempts that keep returning
this error.

robot.run returned: 252
robot.run output is here:
/Users/labquest_automation/Desktop/SikuliX_Scripts/InvokeViewer.sikuli.robot

1.1.4-SNAPSHOT-2019-02-07_09:10/Mac10.14.2/Java8(64)1.8.0_201-b09

I dug around a bit to see if I could figure out what that means and
found: "DATA_ERROR  = 252   # Invalid data or cli args", which I
guess means I've got a bad argument passed or something.  I got that
from here: "https://robot-
framework.readthedocs.io/en/2.9.2/_modules/robot/errors.html"

This is the final Script I attempted:

runScript("""
robot
*** Variables ***
${TESTAPP}   "/Applications/Viewer.app"
*** Settings ***
Library   ./inline/AppLibrary
Test Setupstart my application${TESTAPP}
*** Test Cases ***

""")

class AppLibrary(object):
  def start_my_application(self, myApp):
someApp = App.open(myApp)

-- 
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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)

2019-02-11 Thread Melvin Raymond
Question #678427 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678427

Melvin Raymond gave more information on the question:
I forgot to add the link to the page where I'm trying to figure out how
to use the Sikuli Class app

https://sikulix-2014.readthedocs.io/en/latest/appclass.html#App.setUsing

-- 
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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)

2019-02-12 Thread RaiMan
Question #678427 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678427

Status: Open => Answered

RaiMan proposed the following answer:
I will come back to this later today.

-- 
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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)

2019-02-12 Thread RaiMan
Question #678427 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678427

RaiMan proposed the following answer:
this works:

runScript("""
robot
*** Variables ***
${TESTAPP}  "preview"
*** Settings ***
Library  ./inline/AppLibrary
*** Test Cases ***
Test Setup  start my application  ${TESTAPP}

""")

class AppLibrary(object):
  def start_my_application(self, myApp):
someApp = App.open(myApp)

BE AWARE as already mentioned:
to fill the next column in a line, you have to use at least 2 spaces:

wrong:
Test Setup start my application ${TESTAPP}

correct:
Test Setup  start my application  ${TESTAPP}

-- 
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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)

2019-02-12 Thread Melvin Raymond
Question #678427 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678427

Status: Answered => Open

Melvin Raymond is still having a problem:
I'm sorry Raiman but that didn't work for me. When I copy and paste this
from Sikuli here or from here to Sikuli, it doesn't always seem to copy
spaces correctly (I think).

When you have time, could you please add some "@" characters in that
script where you're putting the spaces? I will remove them after copy
and paste into Sikuli. That would be very helpful and I think I saw on
the forums where you had done that for someone else.

In the meantime I'll continue to try and figure out where I'm messing up
those spaces. I'm aware of the spacing but not always aware of what
defines a column, and there's so much documentation to get through that
I have a difficult time locating it.

-- 
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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)

2019-02-12 Thread Melvin Raymond
Question #678427 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678427

Melvin Raymond gave more information on the question:
I forgot to mention also that the error has changed. I'm getting
"robot.run returned: 1"

-- 
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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)

2019-02-12 Thread Melvin Raymond
Question #678427 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678427

Melvin Raymond gave more information on the question:
OK. I finally got your script to run by putting tabs behind these lines
of code in your script, so maybe I can do the same with mine and get it
working. Here's what I put in (substituting "@" symbols where I have
spaces:

runScript("""
robot
*** Variables ***
${TESTAPP}"preview"
*** Settings ***
Library./inline/AppLibrary
*** Test Cases ***
Test Setupstart my application${TESTAPP}

""")

class AppLibrary(object):
  def start_my_application(self, myApp):
someApp = App.open(myApp)

-- 
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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)

2019-02-12 Thread Melvin Raymond
Question #678427 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678427

Status: Open => Solved

Melvin Raymond confirmed that the question is solved:
OK, I got my app to launch, so looks like that works Railman. For those
interested in being able to get a jump start on invoking an app on
Mojave using the Robot Framework inside SikuliX, I've included the code
here. This shows an inline class app Keyword. Note also that here I have
substituted "@" symbols where there are spaces. I used 2 TABS in those
areas so I could better see where the "columns" are located.
Theoretically you should be able to copy and paste to SikuliX and then
remove those "@" symbols and replace with a couple TABS. You would also
want to replace the variable ${TESTAPP} with the path to the Application
you want to invoke on the Mac Mojave.

runScript("""
robot
*** Variables ***
${TESTAPP} "/Applications/Viewer.app""
*** Settings ***
Library./inline/AppLibrary 
*** Test Cases ***
Test Setup start my application${TESTAPP}

""")

class AppLibrary(object):
  def start_my_application(self, myApp):
someApp = App.open(myApp)


Once again, thank you very much for your help with this Railman. Took me a bit 
to get this off the ground, but I learned a lot. 

~ Mel

-- 
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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)

2019-02-12 Thread Melvin Raymond
Question #678427 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678427

Melvin Raymond posted a new comment:
RaiMan.

-- 
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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)

2019-02-12 Thread Melvin Raymond
Question #678427 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678427

Melvin Raymond posted a new comment:
I meant to say RayMan so not sure how it ended up being Railman.

-- 
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