MDL-42287 behat: Use string from scorm content, instead of scorm structure

This commit is contained in:
Ankit Agarwal
2013-11-04 15:52:42 +08:00
committed by Dan Poltawski
parent 32bf2cfc64
commit e5eff0b626
2 changed files with 22 additions and 1 deletions
+19
View File
@@ -117,6 +117,25 @@ class behat_general extends behat_base {
}
}
/**
* Switches to the specified iframe.
*
* @Given /^I switch to "(?P<iframe_name_string>(?:[^"]|\\")*)" iframe$/
* @param string $iframename
*/
public function switch_to_iframe($iframename) {
$this->getSession()->switchToIFrame($iframename);
}
/**
* Switches to the main Moodle frame.
*
* @Given /^I switch to the main frame$/
*/
public function switch_to_the_main_frame() {
$this->getSession()->switchToIFrame();
}
/**
* Switches to the specified window. Useful when interacting with popup windows.
*
+3 -1
View File
@@ -35,4 +35,6 @@ Feature: Add scorm activity
And I follow "Awesome SCORM package"
And I should see "Normal"
And I press "Enter"
And I should see "Golf Explained"
And I switch to "scorm_object" iframe
And I switch to "contentFrame" iframe
And I should see "Play of the game"