← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #426645]: Problem running SikuliX-1.1.1 with Robot Framework on Ubuntu 16.04

 

Question #426645 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/426645

Joan Muggleton posted a new comment:
This is the script I pasted into the IDE, then clicked Run in the Run
dropdown.

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

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

-------------------------------------------------------------------------------
This is the output in robot.html:
Test Execution Log

00:00:25.898SUITE test sikuliX
Full Name:	test sikuliX
Source:	/home/joan/test_sikuliX.sikuli.robot/test_sikuliX.robot
Start / End / Elapsed:	20170103 00:05:59.553 / 20170103 00:06:25.451 / 00:00:25.898
Status:	2 critical test, 2 passed, 0 failed
2 test total, 2 passed, 0 failed
00:00:22.482TEST User can log in with correct user and password
Full Name:	test sikuliX.User can log in with correct user and password
Start / End / Elapsed:	20170103 00:05:59.803 / 20170103 00:06:22.285 / 00:00:22.482
Status:	PASS (critical)
00:00:06.690SETUP LoginLibrary . Start Firefox And Goto Testsite ${TESTSITE}
Start / End / Elapsed:	20170103 00:05:59.807 / 20170103 00:06:06.497 / 00:00:06.690
00:00:01.174KEYWORD LoginLibrary . Attempt To Login With Credentials ${USERNAME}, ${PASSWORD}
Start / End / Elapsed:	20170103 00:06:06.501 / 20170103 00:06:07.675 / 00:00:01.174
00:00:13.786KEYWORD LoginLibrary . Status Should Be Accepted
Start / End / Elapsed:	20170103 00:06:07.676 / 20170103 00:06:21.462 / 00:00:13.786
00:00:00.818TEARDOWN LoginLibrary . Stop Firefox
Start / End / Elapsed:	20170103 00:06:21.465 / 20170103 00:06:22.283 / 00:00:00.818
00:00:03.154TEST User cannot log in with invalid user or bad password

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.