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
|
// Add a caption
|
||||||
$captionText = $this->descriptionPipeline->process($videoInfo->getDescription());
|
$captionText = $this->descriptionPipeline->process($videoInfo->getDescription());
|
||||||
$captionText = str_replace('"', '\"', $captionText);
|
$captionText = str_replace('"', '\"', $captionText);
|
||||||
$browser->script("
|
$browser->keys('div[contenteditable]', $captionText); // Type the caption in the contenteditable div
|
||||||
var el = document.querySelector('div[contenteditable]'), text = \"{$captionText}\";
|
// $browser->script("
|
||||||
const dataTransfer = new DataTransfer();
|
// var el = document.querySelector('div[contenteditable]'), text = \"{$captionText}\";
|
||||||
dataTransfer.setData('text', text);
|
// const dataTransfer = new DataTransfer();
|
||||||
const event = new ClipboardEvent('paste', {
|
// dataTransfer.setData('text', text);
|
||||||
clipboardData: dataTransfer,
|
// const event = new ClipboardEvent('paste', {
|
||||||
bubbles: true
|
// clipboardData: dataTransfer,
|
||||||
});
|
// bubbles: true
|
||||||
document.querySelector('div[contenteditable]').dispatchEvent(event)
|
// });
|
||||||
");
|
// document.querySelector('div[contenteditable]').dispatchEvent(event)
|
||||||
|
// ");
|
||||||
//$this->typeText($browser, $captionText, 'div[contenteditable]');
|
//$this->typeText($browser, $captionText, 'div[contenteditable]');
|
||||||
//$captionInput = $browser->driver->findElement(WebDriverBy::xpath('//div[@contenteditable]'));
|
//$captionInput = $browser->driver->findElement(WebDriverBy::xpath('//div[@contenteditable]'));
|
||||||
//$captionInput->sendKeys($this->descriptionPipeline->process($videoInfo->getDescription()));
|
//$captionInput->sendKeys($this->descriptionPipeline->process($videoInfo->getDescription()));
|
||||||
|
Reference in New Issue
Block a user