You are here

public function VarbaseContext::iPressTheButtonUnderTheEditorMediaBrowser 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::iPressTheButtonUnderTheEditorMediaBrowser()
  2. 8.4 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iPressTheButtonUnderTheEditorMediaBrowser()
  3. 8.6 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iPressTheButtonUnderTheEditorMediaBrowser()
  4. 8.7 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iPressTheButtonUnderTheEditorMediaBrowser()
  5. 9.0.x tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iPressTheButtonUnderTheEditorMediaBrowser()

#varbase : To press a button in the filter form under the editor media browser.

Example 1: When I press the "Apply" button under the editor media browser Example 2: When I press the "Submit" button under the editor media browser

@When /^I press (?:|the )"([^"]*)" button under the editor media browser$/

File

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

Class

VarbaseContext
Defines application features from the specific context.

Code

public function iPressTheButtonUnderTheEditorMediaBrowser($button) {

  // Switch to the "entity_browser_iframe_editor_media_browser" iframe.
  $this
    ->getSession()
    ->switchToIFrame('entity_browser_iframe_editor_media_browser');
  try {
    $this
      ->getSession()
      ->wait(1000, 'typeof(jQuery)=="undefined" || jQuery("#autocomplete").length === 0');
  } catch (UnsupportedDriverActionException $e) {
  }
  $this
    ->getSession()
    ->getPage()
    ->pressButton($button);

  // Switch back too the page from the "entity_browser_iframe_editor_media_browser" iframe.
  $this
    ->getSession()
    ->switchToIFrame(null);
}