sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #37998
Re: [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 Setup start 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 Be Accepted
User cannot log in with invalid user or bad password
Attempt to Login with Credentials betty wrong
Status Should Be Denied
""")
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.