Parameterization with sikuli

Asked by Ankit Jain

>how to use parametrization if I want to parametrize username & password for the below script:
> Moto is to run below script n times with n number of users.
>please help

import unittest
import HTMLTestRunner
class TestA(unittest.TestCase):
    def setUp(self):
        openApp("C:\\Program Files\\Microsoft Office\\Office14\\WINWORD.EXE")
        while not exists("Pr00fGuru-1.png"):
            sleep(5)
        click("Pr00fGuru.png")
        click("Starthacking.png")
        while not exists("SignInEmailI.png"):
            sleep(5)
        click("EmailID.png")
        type("<email address hidden>\t")
        type("testing")
        click("1342006158928.png")

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

look question https://answers.launchpad.net/sikuli/+question/204153
for the principle.

Since you want to use the next user in setup(), you have to implement some global reader class/function that delivers the next user on request.

BTW: what is your motivation to use unit test? why not use normal Python coding - would be much easier?

Can you help with this problem?

Provide an answer of your own, or ask Ankit Jain for more information if necessary.

To post a message you must log in.