You are here

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

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.5 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iClickTheEditorMediaBrowserCommandButton()
  4. 8.6 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iClickTheEditorMediaBrowserCommandButton()
  5. 8.7 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iClickTheEditorMediaBrowserCommandButton()

Click the editor media browser command button.

Varbase Context #varbase.

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 268

Class

VarbaseContext
Defines application features from the specific context.

Code

public function iClickTheEditorMediaBrowserCommandButton() {
  $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();
}