Answer the question
In order to leave comments, you need to log in
How to click on a link in a modal window in a codeception test?
There is a link on the page:
<a href="" class="confirm"><i class="fa fa-times"></i></a>
<div class="modal-footer"><button class="confirm btn btn-flat success" type="button" data-dismiss="modal">Да, уверен</button><button class="cancel btn btn-flat danger" type="button" data-dismiss="modal">Нет, передумал</button></div>
$I->click(Locator::firstElement('//modal-footer/button'));
$I->click('.modal-footer .success');
[Facebook\WebDriver\Exception\ElementNotVisibleException] element not visible
Fail Link or Button or CSS or XPath element with '(//modal-footer/button)[position()=1]' was not found.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question