try with keys
All checks were successful
Push image to registry / build-image (push) Successful in 4m36s
All checks were successful
Push image to registry / build-image (push) Successful in 4m36s
This commit is contained in:
@ -333,16 +333,17 @@ class InstagramRepostJob extends BrowserJob implements ShouldBeUniqueUntilProces
|
||||
// Add a caption
|
||||
$captionText = $this->descriptionPipeline->process($videoInfo->getDescription());
|
||||
$captionText = str_replace('"', '\"', $captionText);
|
||||
$browser->script("
|
||||
var el = document.querySelector('div[contenteditable]'), text = \"{$captionText}\";
|
||||
const dataTransfer = new DataTransfer();
|
||||
dataTransfer.setData('text', text);
|
||||
const event = new ClipboardEvent('paste', {
|
||||
clipboardData: dataTransfer,
|
||||
bubbles: true
|
||||
});
|
||||
document.querySelector('div[contenteditable]').dispatchEvent(event)
|
||||
");
|
||||
$browser->keys('div[contenteditable]', $captionText); // Type the caption in the contenteditable div
|
||||
// $browser->script("
|
||||
// var el = document.querySelector('div[contenteditable]'), text = \"{$captionText}\";
|
||||
// const dataTransfer = new DataTransfer();
|
||||
// dataTransfer.setData('text', text);
|
||||
// const event = new ClipboardEvent('paste', {
|
||||
// clipboardData: dataTransfer,
|
||||
// bubbles: true
|
||||
// });
|
||||
// document.querySelector('div[contenteditable]').dispatchEvent(event)
|
||||
// ");
|
||||
//$this->typeText($browser, $captionText, 'div[contenteditable]');
|
||||
//$captionInput = $browser->driver->findElement(WebDriverBy::xpath('//div[@contenteditable]'));
|
||||
//$captionInput->sendKeys($this->descriptionPipeline->process($videoInfo->getDescription()));
|
||||
|
Reference in New Issue
Block a user