Guest User

Untitled

a guest
Aug 17th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. def answerQuestions(numQuestions, numAnswers, sectionName) {
  2. for(int i = 0; i < numQuestions; i++) {
  3. log.info(" ${bookingcode}t"+sectionName+": "+ i)
  4.  
  5. //I need to select the 1st option for 1 st question instead random
  6. def index = rand.nextInt(numAnswers)
  7. doThink()
  8. waitFor {
  9. cover.displayed == false
  10. mcQuestions*.displayed
  11. clickHammer(mcQuestions[index])
  12. mcQuestions[index].value() != null
  13. nextButton.displayed
  14. }
  15. nextButton.click()
  16. }
  17. }
Add Comment
Please, Sign In to add comment