Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Status-Untriaged
New issue 5919 by
c...@realvnc.com: Can't send Control+key to Chrome when
using Mac OSX
http://code.google.com/p/selenium/issues/detail?id=5919
Selenium version: v33.0
OS: Mac OSX 10.8 (Mountain Lion)
Browser: Chrome
Browser version: 28.0.1500.71
The browser never receives the keys when I send control (or command) and
another key. I am using the Java bindings. Here is some sample code:
import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection;
import org.junit.Test;
import
org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
public class ExamplePasteFailure {
@Test
public void testPaste()
{
WebDriver chrome = new ChromeDriver();
chrome.get("
http://www.google.com");
WebElement element = chrome.findElement(By.name("q"));
Clipboard clipboard =
Toolkit.getDefaultToolkit().getSystemClipboard();
StringSelection clipboardtext = new StringSelection("Hello world");
clipboard.setContents(clipboardtext, null);
element.sendKeys(Keys.chord(Keys.CONTROL,"v"));
element.sendKeys("abc");
Thread.sleep(1000);
chrome.close();
}
}
I can guarantee that "Hello world" is placed in the computer's clipboard!
This bug doesn't exist on Ubuntu 12.04 and I think it might be related to
issue .
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings