Issue 8468 in selenium: Ctrl+q chord does not produce same effect in Firefirefox 24.0 as a human pressing Ctrl+q

19 views
Skip to first unread message

sele...@googlecode.com

unread,
Feb 5, 2015, 4:18:30 PM2/5/15
to selenium-develope...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Status-Untriaged

New issue 8468 by rmbarn...@gmail.com: Ctrl+q chord does not produce same
effect in Firefirefox 24.0 as a human pressing Ctrl+q
https://code.google.com/p/selenium/issues/detail?id=8468

What steps will reproduce the problem?
1. Open a page in Firefox 24.0 that is listening for the Ctrl+q chord.
2. Execute code:

_driver.findElement(By.tagName("body")).sendKeys(Keys.chord(Keys.CONTROL,
Keys.getKeyFromUnicode('q')));

What is the expected output?

The page specific correct response of the webpage to the chord Ctrl+q.

What do you see instead?

A new blank tab is opened. A new window displaying source code of the page
is opened.

Selenium version: 2.44.0
OS: Windows 7
Browser: Firefox
Browser version: 24.0




--
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

sele...@googlecode.com

unread,
Feb 11, 2015, 4:53:53 AM2/11/15
to selenium-develope...@googlegroups.com

Comment #1 on issue 8468 by sadasiva...@gmail.com: Ctrl+q chord does not
produce same effect in Firefirefox 24.0 as a human pressing Ctrl+q
https://code.google.com/p/selenium/issues/detail?id=8468

public static Keys getKeyFromUnicode(char key)
Get the special key representation, Keys, of the supplied character if
there is one. If there is no special key tied to this character, null will
be returned.
System.out.println(Keys.getKeyFromUnicode('q')) return null.

And our command to system from selenium is below
_driver.findElement(By.tagName("body")).sendKeys(Keys.chord(Keys.CONTROL,
Keys.getKeyFromUnicode('q')));
it will be evaluated as
_driver.findElement(By.tagName("body")).sendKeys(Keys.chord(Keys.CONTROL, "NULL"));
ctrl+N means Open New Tab
ctrl+U means open source code of web page.

Solution:

_driver.findElement(By.tagName("body")).sendKeys(Keys.chord(Keys.CONTROL, "q");
if it doesn't work to quit the browser then it is not binded with OS for
short cut.
Additional info:
_driver.findElement(By.tagName("body")).sendKeys(Keys.chord(Keys.CONTROL, "W");
above code was closed the current window.

sele...@googlecode.com

unread,
Feb 11, 2015, 4:56:45 AM2/11/15
to selenium-develope...@googlegroups.com

Comment #2 on issue 8468 by sadasiva...@gmail.com: Ctrl+q chord does not
produce same effect in Firefirefox 24.0 as a human pressing Ctrl+q
https://code.google.com/p/selenium/issues/detail?id=8468

public static Keys getKeyFromUnicode(char key)
Get the special key representation, Keys, of the supplied character if
there is one. If there is no special key tied to this character, null will
be returned.
System.out.println(Keys.getKeyFromUnicode('q')) return null.

And our command to system from selenium is below
_driver.findElement(By.tagName("body")).sendKeys(Keys.chord(Keys.CONTROL,
Keys.getKeyFromUnicode('q')));
it will be evaluated as
_driver.findElement(By.tagName("body")).sendKeys(Keys.chord(Keys.CONTROL, "NULL"));
ctrl+N means Open New Tab
ctrl+U means open source code of web page.
Because of above reason it opened new window and opened source code of the
opened webpage.
ctrl+l don't have any functionality.

Solution:

_driver.findElement(By.tagName("body")).sendKeys(Keys.chord(Keys.CONTROL, "q");
if it doesn't work to quit the browser then it is not binded with OS for
short cut.
Additional info:
_driver.findElement(By.tagName("body")).sendKeys(Keys.chord(Keys.CONTROL, "W");
above code was closed the current window



sele...@googlecode.com

unread,
Feb 13, 2015, 12:38:25 AM2/13/15
to selenium-develope...@googlegroups.com
Updates:
Status: WorkingAsIntended
Labels: -Status-Untriaged

Comment #3 on issue 8468 by barancev: Ctrl+q chord does not produce same
effect in Firefirefox 24.0 as a human pressing Ctrl+q
https://code.google.com/p/selenium/issues/detail?id=8468

Yes, don't use getKeyFromUnicode for regular chars.
Reply all
Reply to author
Forward
0 new messages