sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #38239
Re: [Question #294078]: robot.run with SikuliX-IDE, can't get Robot outcome.
Question #294078 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/294078
masuo posted a new comment:
I do not think this is a better way, but I found a workaround for this problem.
I am trying to solve this problem by describing both runScript() and robot.run() in a single code.
I use runScript() as a dummy.
[my code]
(1)C:\script\robot_run.sikuli\robot_run.py
runScript("""
robot
*** Variables ***
*** Settings ***
Library ./inline/Dummy
*** Test Cases ***
""")
class Dummy(object):
def main(self):
pass
import robot.run
datasource = "C:/script/robot_run.sikuli/sample.robot"
scriptdir = "C:/script/robot_run.sikuli"
robot.run(datasource,outputdir=scriptdir)
(2)C:\script\robot_run.sikuli\sample.robot
*** Variables ***
${USERNAME} demo
${PASSWORD} mode
${TESTSITE} http://test.sikuli.de
*** Settings ***
Library C:/script/robot_run.sikuli/MyLibrary.py
Test Setup start firefox and goto testsite ${TESTSITE}
Test Teardown stop firefox
*** Test Cases ***
正しいユーザ名とパスワードを使ってログインする
Attempt to Login with Credentials ${USERNAME} ${PASSWORD}
Status Should Be Accepted
間違ったユーザ名とパスワードを使ってログインする
Attempt to Login with Credentials betty wrong
Status Should Be Denied
(3)C:\script\robot_run.sikuli\MyLibrary.py
# coding: utf-8
from sikuli import *
class MyLibrary(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.