I am creating a Protractor script to test my quiz game that puts up random questions and answers, so I need my script to be able to figure out which answer is correct, so I can click it.
I can't figure out how to get the values directly from the model, instead of elements, since correct/incorrect is not exposed as an element on the page.
The model provides the answers in Choice in Question.Choices, and I need to find the Choice where Choice.IsCorrect is true. How do I get access to this value?
I wouldn't use the element() function, right?
element(by.repeater('Choice in Question.Choices').row(0).column('Choice.IsCorrect'))