How can i write a script to automate the page which contains random questions with corresponding answers as radio buttons eg:questions1............a b c dquestion 2a b c d..............

Showing Answers 1 - 1 of 1 Answers

how can i write a script to automate the page which contains random questions with corresponding answers as radio buttons
eg:
questions1............
a b c d
question 2
a b c d
........
......

ACTUAL_ANS(0) = "2"
ACTUAL_ANS(0) = "1"
ACTUAL_ANS(0) = "3"
ACTUAL_ANS(0) = "4"


RANDOM_ANS(I) = ANY RANDOM NO THROUGH RANDOMIZE FN RANGE BETWEEN 1 TO 4

Browser("QUIZ").Page("QUIZ_PAGE").WebRadioGroup("FIRSTQN").Select "#"&RANDOM_ANS(0)
Browser("QUIZ").Page("QUIZ_PAGE").WebRadioGroup("SECONDQN").Select "#"&RANDOM_ANS(1)
Browser("QUIZ").Page("QUIZ_PAGE").WebRadioGroup("THIRDQN").Select "#"&RANDOM_ANS(2)
Browser("QUIZ").Page("QUIZ_PAGE").WebRadioGroup("FOURTHQN").Select "#"&RANDOM_ANS(3)


VALIDATE FOR ALL THE ANSWERS IN THAT ARRAY IN A LOOP

FOR LOOP
IF RANDOM_ANS(I) = ACTUAL_ANS(I)
GOOD_ANWSERED = GOOD_ANWSERED + 1
END IF
MSGBOX GOOD_ANWSERED ARE THE SCORE !!!
NEXT

BY

V-know-th

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions