Copy paste values headless Chrome

I have this code for copy paste values… in mode headless chrome , the values are not paste in the page

public void pasteValuesFromClipboard(WebDriver webDriver, Strategy strategy){

try{

WebElement web_ApMax

WebElement web_ApMin

WebElement web_seatIndex

WebElement web_valorBP

WebElement web_textArea

TestObject textAreaInTable = ObjectRepository.findTestObject(“Object Repository/Pages/Mantenedor/DetallesEstrategias/TableStrategyInputDataField”)

String xpathBaseTableStrategy = ObjectRepository.findTestObject(“Object Repository/Pages/Mantenedor/DetallesEstrategias/tableStrategyTbody”).findPropertyValue(“xpath”)

int index=1

for(StrategyDetails detail : strategy.strategyDetails){

web_ApMax = webDriver.findElement(By.xpath(xpathBaseTableStrategy + “/tr[”+ index +“]/td[1]”))

web_ApMin = webDriver.findElement(By.xpath(xpathBaseTableStrategy + “/tr[”+ index +“]/td[2]”))

web_seatIndex = webDriver.findElement(By.xpath(xpathBaseTableStrategy + “/tr[”+ index +“]/td[3]”))

web_valorBP = webDriver.findElement(By.xpath(xpathBaseTableStrategy + “/tr[”+ index +“]/td[4]”))

clicOnElement(web_ApMax, 1)

web_textArea = webDriver.findElement(By.xpath(textAreaInTable.findPropertyValue(“xpath”)))

addToClipboard(detail.APMax + “\t”)

web_textArea.sendKeys(Keys.CONTROL+ “v”)

addToClipboard(detail.APMin + “\t”)

web_textArea.sendKeys(Keys.CONTROL+ “v”)

addToClipboard(detail.SeatIndex + “\t”)

web_textArea.sendKeys(Keys.CONTROL+ “v”)

addToClipboard(detail.ValorBP)

web_textArea.sendKeys(Keys.CONTROL+ “v”)

web_textArea.sendKeys(Keys.ENTER)

index++

}

}catch(Exception e){

KeywordUtil.markFailed("Ocurrió un error al insertar detalles de la estrategia: " + e.message)

}

}

someone, can helpme please?

Do you get any error messages when you run the headless script?

Are you sure the element is “visible” in headless mode? Have you set the window size for Chrome (headless):

2018-11-23_8-19-52.png

I think that problem is here … web_textArea.sendKeys(Keys.CONTROL+ “v”) … I taked a screenshoot and not paste the values …
The question is … Can this be pasted in headless mode?