← Back to team overview

sikuli-driver team mailing list archive

[Question #244887]: Condition under if-elif is not working.

 

New question #244887 on Sikuli:
https://answers.launchpad.net/sikuli/+question/244887

Hi,
I am trying to select a radio button option for a question using if-elif condition block but the program control is never transferred to if-elif block.Below is my code.

Sript1:

def FeedbackQuestion(question):
    find(question)
    num = random.randint(1,5)
    print(num)
    if num==1:
       click(radioOption1)
    elif num==2:
      click(radioOption2)
    elif num==3: 
      click(radioOption3)
    elif num==4:
      click(radioOption4)
    elif num==5:
      click(radioOption5)
    print("question and option selection was successful")

Script2:
import script1

script1.FeedbackQuestion(script1.question2)

Can you please help me to resolve this issue.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.