How can I access the form elements like ng-repeat for automating web applications with front end angularjs using java-selenium Webdriver. I was able to automate most of the things in the web application with this with the help of xpath. Now situation came where I have to do auto generated quizzes where the number of questions, the question type, etc can vary depending upon the quiz type. Now I have to access the data-ng-repeat index count. The html of the same is given below, please help me to get the index count here.
<div class="margin-top-30">
<!-- <div class="progress-box time-header-font-2 text-center open-sans"
ng-repeat="x in [1,2,3,4,5,6,7] track by $index">{{x}}
</div> -->
<!-- ngRepeat: assessment in assessmentData -->
<div data-ng-repeat="assessment in assessmentData" class="progress-box time-header-font-2 text-center pointer-cursor open-sans legend-0" data-ng-click="loadRandomQuestion($index)" style="">1</div>
<!-- end ngRepeat: assessment in assessmentData -->
<div data-ng-repeat="assessment in assessmentData" class="progress-box time-header-font-2 text-center pointer-cursor open-sans legend-0" data-ng-click="loadRandomQuestion($index)">2</div>
<!-- end ngRepeat: assessment in assessmentData -->
<div data-ng-repeat="assessment in assessmentData" class="progress-box time-header-font-2 text-center pointer-cursor open-sans legend-0" data-ng-click="loadRandomQuestion($index)">3</div>
<!-- end ngRepeat: assessment in assessmentData -->
<div data-ng-repeat="assessment in assessmentData" class="progress-box time-header-font-2 text-center pointer-cursor open-sans legend-0" data-ng-click="loadRandomQuestion($index)">4</div>
<!-- end ngRepeat: assessment in assessmentData -->
<div data-ng-repeat="assessment in assessmentData" class="progress-box time-header-font-2 text-center pointer-cursor open-sans legend-0" data-ng-click="loadRandomQuestion($index)">5</div>
<!-- end ngRepeat: assessment in assessmentData -->
</div>
<div class="col-sm-12 padding-snip">
<div data-ng-show="finish_quiz" class="finish-quiz-btn text-center ng-hide" style="">
<span class="time-header-font-1 open-sans"><span translate="portallang_finishQuiz" class="ng-scope">FINISH QUIZ</span></span>
</div>
<!-- <div ng-if="count+1 >= totalQuestions" class="finish-quiz-btn text-center pointer-cursor legend-1" ng-click="stop();">
<span class="time-header-font-1 open-sans">FINISH QUIZ</span>
</div> -->
</div>
$index?