You are here

public function VarbaseContext::iClickTheEditorMediaBrowserCommandButton in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.5

Same name and namespace in other branches
  1. 8.8 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iClickTheEditorMediaBrowserCommandButton()
  2. 8.4 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iClickTheEditorMediaBrowserCommandButton()
  3. 8.6 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iClickTheEditorMediaBrowserCommandButton()
  4. 8.7 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iClickTheEditorMediaBrowserCommandButton()
  5. 9.0.x tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iClickTheEditorMediaBrowserCommandButton()

#varbase : Click the editor media browser command button

Example 1: When I click the editor media browser command button

@When /^I click the editor media browser command button$/

File

tests/features/bootstrap/VarbaseContext.php, line 218

Class

VarbaseContext
Defines application features from the specific context.

Code

public function iClickTheEditorMediaBrowserCommandButton() {
  $element = $this
    ->getSession()
    ->getPage();
  $editorMediaBrowserButton = $this
    ->getSession()
    ->getPage()
    ->find('css', '.cke_button.cke_button__media');
  if (empty($editorMediaBrowserButton)) {
    throw new Exception('The editor media browser button dose not exist.');
  }
  $editorMediaBrowserButton
    ->click();
}