This commit is contained in:
Eloy Lafuente (stronk7) 2015-05-19 18:02:34 +02:00
commit 7dd6cd75de

View file

@ -180,7 +180,7 @@ class behat_course extends behat_base {
// Clicks the selected activity if it exists. // Clicks the selected activity if it exists.
$activityxpath = "//div[@id='chooseform']/descendant::label" . $activityxpath = "//div[@id='chooseform']/descendant::label" .
"/descendant::span[contains(concat(' ', normalize-space(@class), ' '), ' typename ')]" . "/descendant::span[contains(concat(' ', normalize-space(@class), ' '), ' typename ')]" .
"[contains(., $activityliteral)]" . "[normalize-space(.)=$activityliteral]" .
"/parent::label/child::input"; "/parent::label/child::input";
$activitynode = $this->find('xpath', $activityxpath); $activitynode = $this->find('xpath', $activityxpath);
$activitynode->doubleClick(); $activitynode->doubleClick();
@ -190,7 +190,7 @@ class behat_course extends behat_base {
// Selecting the option from the select box which contains the option. // Selecting the option from the select box which contains the option.
$selectxpath = $sectionxpath . "/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' section_add_menus ')]" . $selectxpath = $sectionxpath . "/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' section_add_menus ')]" .
"/descendant::select[contains(., $activityliteral)]"; "/descendant::select[option[normalize-space(.)=$activityliteral]]";
$selectnode = $this->find('xpath', $selectxpath); $selectnode = $this->find('xpath', $selectxpath);
$selectnode->selectOption($activity); $selectnode->selectOption($activity);