Skip to content

Commit

Permalink
Make Behat's step of upload media, language independent
Browse files Browse the repository at this point in the history
  • Loading branch information
albeorte96 committed Mar 14, 2023
1 parent 076d583 commit 6b7d9db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Behat/Context/MediaContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function iUploadMediaWithNameToField($media_title, $field, $widget) {
if ($widget == 'media_library') {
$this->uiContext->iClickOnTheElementWithXpath("//input[contains(@id, 'edit-" . $field . "-open-button')]");
$this->waitingContext->iWaitForAjaxToFinish(30);
$xpath = "//*[@id='drupal-modal']//label[text()='Select " . $media_title . "']/following-sibling::input";
$xpath = "//*[@id='drupal-modal']//label[contains(text(),'". $media_title ."')]/following-sibling::input";
$this->iSelectMedia($widget, $xpath);
}
}
Expand Down

0 comments on commit 6b7d9db

Please sign in to comment.