public QuestionPage AnswerYes() { if (!Driver.FindElements(By.CssSelector("[for='Yes']")).Any()) { throw new Exception("No answer with label for 'Yes' could be found for question " + Header.Text); } AnswerYesButton.Click(); NextButton.Click(); AwaitNextQuestionPage(); return(new QuestionPage(Driver)); }
public QuestionPage AnswerYes() { if (!_driver.FindElements(By.Id("Yes")).Any()) { throw new Exception("No answer with id 'Yes' could be found for question " + Header.Text); } AnswerYesButton.Click(); NextButton.Click(); AwaitNextQuestionPage(); return(new QuestionPage(_driver)); }
private bool isActionDone; //Была ли нажата хотя бы одна из кнопок private void Awake() { windowEllements = new CanvasRenderer[GetComponentsInChildren <CanvasRenderer>().Length]; windowEllements = GetComponentsInChildren <CanvasRenderer>(); answerYesButton = answerYesButtonObject.GetComponent <AnswerYesButton>(); answerNoButton = answerNoButtonObject.GetComponent <AnswerNoButton>(); secondBgAnim = secondBg.GetComponent <Animator>(); answerYesButtonAnim = answerYesButtonObject.GetComponent <Animator>(); answerNoButtonAnim = answerNoButtonObject.GetComponent <Animator>(); isActionDone = false; }