We have two button named “Inschrijven” in Tab1 section and Tab2 section as shown in below image
Tab 1:
<span class="form-submit-wrapper"><input type="submit" id="edit-submit--3" name="op" value="Inschrijven" class="form-submit"></span>
Tab 2:
<span class="form-submit-wrapper"><input onclick="return validate_course_anywhere(this)" type="submit" id="edit-submit--22" name="op" value="Inschrijven" class="form-submit"></span>
When I click element with id "edit-submit--3"
This behat code scenario is worked in Tab 1 section but not in tab 2 section ( When I click element with id "edit-submit--22"
)
/**
* @When /^I click element with id "([^"]*)"$/
*/
public function iClickElementWithId($class) {
$locator = "#$class";
$element = $this->getSession()->getPage()->find('css', $locator);
if (null === $element) {
throw new \InvalidArgumentException(sprintf('Could not evaluate CSS selector: "%s"', $locator));
}
$element->click();
$this->getSession()->wait(1000);
}
But error message is displaying in Tab 2 section:
Exception thrown by (//html/descendant-or-self::*[@id = 'edit-submit--22'])[1]
Element is not clickable at point (813.5, 16.666671752929688). Other element would receive the click: <a href="/certificering" title="" class="menu__link"></a>