← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #637031]: Unable to run sikuli script with robo class from main script

 

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

    Status: Answered => Open

Test App is still having a problem:
Hi Masuo ,

Thank you for the reply .
What i mean by Main script is the script which contains the test names of all the other scripts.
Say i want to run multiple scripts one after the other i use the following code

### Main script code###

import Script1
import Script2
import Script3

###End of main script###

When i run this main script all my test cases should be executed one
after the other.This is what is expected . But my code throws an error
saying  Unable to find keywords .So how do i call multiple robo scripts
in my main script without any errors

###Below is my Script 1 code###

from sikuli import*
runScript("""
robot
*** Variables ***
${USERNAME} demo
${PASSWORD} mode
${TESTSITE} http://test.sikuli.de
*** Settings ***
Library ./inline/LoginLibrary
Test Setup launch application
Test Teardown stop application
*** Test Cases ***
TC-18 :Validate tab for a new case
    Create patient

""")

class LoginLibrary(object):
  def launch_application(self):
      #write code to launch app
     doubleClick("1495488947167.png")
     wait(10)
     if exists ("home.png"):
          print("PASS:App launch sucessfull")
     else:
          print("FAIL:App launch unsucessfull")

    def Create_patient(self):
    click("1495488977291.png")
    wait(5)
    if exists("namefield.png"):
        print("PASS:Enter name of new patient")
        type("")
    else:
        print("FAIL:field is not available")

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