Issue 5403 in selenium: sendKeys(Keys.TAB) doesnt work with safari driver

156 views
Skip to first unread message

sele...@googlecode.com

unread,
Mar 26, 2013, 7:59:17 PM3/26/13
to selenium-develope...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Status-Untriaged

New issue 5403 by n.kalyan...@gmail.com: sendKeys(Keys.TAB) doesnt work
with safari driver
http://code.google.com/p/selenium/issues/detail?id=5403



What steps will reproduce the problem?
1.enter some text into input field(el.sendKeys("foo");)
2.el.sendKeys(Keys.TAB);



expected: cursor focus should be moved to next input field
Actual: on entering Keys.TAB the focus is still on the current element only

Selenium version: 2.31.0
OS:windows7
Browser:safari
Browser version:5.1.7

sample code to reproduce the issue:

WebDriver driver = new SafariDriver(DesiredCapabilities.safari());
driver.get("http://www.gmail.com");
driver.findElement(By.id("Email")).clear();
driver.findElement(By.id("Email")).sendKeys("blablabla");
driver.findElement(By.id("Email")).sendKeys(Keys.TAB);




--
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,
Mar 26, 2013, 8:01:07 PM3/26/13
to selenium-develope...@googlegroups.com

Comment #1 on issue 5403 by n.kalyan...@gmail.com: sendKeys(Keys.TAB)
please address this issue as soon as possible. as because of this my total
scripts are failing.
looking forward for your response.

sele...@googlecode.com

unread,
Mar 28, 2013, 11:14:01 PM3/28/13
to selenium-develope...@googlegroups.com
Updates:
Status: NotFeasible
Owner: jmle...@gmail.com
Labels: -Status-Untriaged Component-WebDriver Browser-Safari

Comment #2 on issue 5403 by jmle...@gmail.com: sendKeys(Keys.TAB) doesnt
The SafariDriver simulates key events through javascript. It is not
possible to change focus using Keys.TAB with JS.

sele...@googlecode.com

unread,
Mar 29, 2013, 6:01:05 PM3/29/13
to selenium-develope...@googlegroups.com

Comment #3 on issue 5403 by raghu....@gmail.com: sendKeys(Keys.TAB) doesnt
Facing some what similar issue,
i have on change events defined for few fields, but they are not getting
triggered.
Tried the Tab method mentioned above, it doesn't work yet.

Unless i modify some text manually in the fields, the event is not getting
triggered,
is there any way workaround possible?

Thanks,
Raghu.

sele...@googlecode.com

unread,
Mar 29, 2013, 6:02:05 PM3/29/13
to selenium-develope...@googlegroups.com

Comment #4 on issue 5403 by raghu....@gmail.com: sendKeys(Keys.TAB) doesnt
work with safari driver
http://code.google.com/p/selenium/issues/detail?id=5403

Facing some what similar issue,
i have on change events defined for few fields, but they are not getting
triggered.
Tried the Tab method mentioned above, it doesn't work yet.

Unless i modify some text manually in the fields, the event is not getting
triggered,
is there any way workaround possible?




sele...@googlecode.com

unread,
Mar 31, 2013, 7:18:05 AM3/31/13
to selenium-develope...@googlegroups.com

Comment #5 on issue 5403 by n.kalyan...@gmail.com: sendKeys(Keys.TAB)
if so, is there any way to simulate the change focus event in safari using
safari webdriver.please advise.

sele...@googlecode.com

unread,
Apr 11, 2013, 9:47:58 AM4/11/13
to selenium-develope...@googlegroups.com

Comment #6 on issue 5403 by javaspar...@gmail.com: sendKeys(Keys.TAB)
The issue is resolved with Selenium 2.32 code drop.

sele...@googlecode.com

unread,
Apr 4, 2014, 1:13:27 PM4/4/14
to selenium-develope...@googlegroups.com

Comment #7 on issue 5403 by jer...@sickly.org: sendKeys(Keys.TAB) doesnt
We're getting the same problem here with latest Selenium version 2.41.0.
Don't understand how this bug can be regarded as "NotFeasible" - isn't the
whole point of Selenium that there's a uniform API for testing that works
in all browsers?

sele...@googlecode.com

unread,
Apr 8, 2014, 12:16:10 PM4/8/14
to selenium-develope...@googlegroups.com

Comment #8 on issue 5403 by jmle...@gmail.com: sendKeys(Keys.TAB) doesnt
Don't confuse uniform API with uniform implementation. As stated in
comment #2:

"The SafariDriver simulates key events through javascript. It is not
possible to change focus using Keys.TAB with JS."

sele...@googlecode.com

unread,
Apr 8, 2014, 1:27:45 PM4/8/14
to selenium-develope...@googlegroups.com

Comment #9 on issue 5403 by jer...@sickly.org: sendKeys(Keys.TAB) doesnt
Hi yes I saw your earlier comment. But aren't you confusing implementation
with specification? I mean if SafariDriver works in such a way that it's
impossible to support the specification (i.e. the API), then it's still an
outstanding bug isn't it, relative to the spec, even if it's impossible to
resolve? And is it impossible to resolve - I mean might there be a
workaround, perhaps simulating key events in a different way (that works)?

I don't mean to knock your work on SafariDriver/Selenium as we much
appreciate it here, it's just irritating to see that this particular thing
will apparently remain broken forever. The idea of Selenium is surely that
you can run the same test against multiple browsers and have them behave
consistently; for us, it means we're going to have to rewrite the tests we
have to avoid using tab key presses in order to get them to pass in
Safari. What we want to be doing is finding and fixing bugs in our own
product; what we're actually doing is finding and working around bugs in
Selenium / Selenium drivers.

sele...@googlecode.com

unread,
Aug 1, 2014, 3:48:19 PM8/1/14
to selenium-develope...@googlegroups.com

Comment #10 on issue 5403 by akku12...@gmail.com: sendKeys(Keys.TAB) doesnt
This defect is still there where in Tab keys don't work with Safari driver
in Saucelabs cloud and locally as well . Please let me know if anybody has
found a workaround for this issue .

sele...@googlecode.com

unread,
Aug 1, 2014, 3:49:34 PM8/1/14
to selenium-develope...@googlegroups.com

Comment #11 on issue 5403 by akku12...@gmail.com: sendKeys(Keys.TAB) doesnt
I tested it with 2.41.0 Webdriver version in saucelabs .
Reply all
Reply to author
Forward
0 new messages