mercredi 20 mars 2019

selenium.interactions.Actions class for copy/cut/paste not working in chrome browser - Selenium Test Automation

I have to copy a object(text/shape) in my application and paste it to another area.

In this case I have to paste irrespective to the webElement. So I can not use this - driver.findElement(By.id("")).sendKeys(Keys.chord(Keys.CONTROL,"v"));

So I am using Actions class in selenium - selenium.interactions.Actions

actions.keyDown(command).sendKeys("c").keyUp(command).build().perform();

This method is not working chrome72 and chromedriver72.

I have been facing this issue for many months. And surf the web for solutions and got many sites are speaking about that - https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/5946

But couldn't find any answers and the problem still exists in very recent versions of chrome and chromedriver.

Aucun commentaire:

Enregistrer un commentaire