MDL-69138 behat: Add "I visit :localurl" step
This commit is contained in:
committed by
Adrian Greeve
parent
11eb85e494
commit
d61fa24239
@@ -1937,4 +1937,16 @@ EOF;
|
||||
$value = [\WebDriver\Key::ENTER];
|
||||
$this->getSession()->getDriver()->getWebDriverSession()->activeElement()->postValue(['value' => $value]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Visit a local URL relative to the behat root.
|
||||
*
|
||||
* @When I visit :localurl
|
||||
*
|
||||
* @param string|moodle_url $localurl The URL relative to the behat_wwwroot to visit.
|
||||
*/
|
||||
public function i_visit($localurl): void {
|
||||
$localurl = new moodle_url($localurl);
|
||||
$this->getSession()->visit($this->locate_path($localurl->out_as_local_url(false)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user