Issue 4608 in selenium: element.send_keys('.') tries to upload a file instead of sending the key to the input box using the grid

17 views
Skip to first unread message

sele...@googlecode.com

unread,
Sep 24, 2012, 12:30:26 PM9/24/12
to selenium-develope...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Status-Untriaged

New issue 4608 by bebef.1...@gmail.com: element.send_keys('.') tries to
upload a file instead of sending the key to the input box using the grid
http://code.google.com/p/selenium/issues/detail?id=4608

Sending only the '.' over the grid returns a python error:

Traceback (most recent call last):
File "sel4.py", line 17, in <module>
element.send_keys('.')

File "/home/florinstrugariu/.virtualenvs/marketplace/local/lib/python2.7/site-packages/selenium/webdriver/remote/webelement.py",
line 144, in send_keys
value = self._upload(local_file)

File "/home/florinstrugariu/.virtualenvs/marketplace/local/lib/python2.7/site-packages/selenium/webdriver/remote/webelement.py",
line 237, in _upload
raise e
selenium.common.exceptions.WebDriverException: Message: u'invalid stored
block lengths' ; Stacktrace: Method read threw an error in
InflaterInputStream.java






What steps will reproduce the problem?
Run the code

from selenium import webdriver
from selenium.webdriver.common.by import By

capabilities = getattr(webdriver.DesiredCapabilities, 'FIREFOX')
capabilities['version'] = '14'
capabilities['platform'] = 'MAC'

executor = 'http://webqa.local:4444/wd/hub'

driver = webdriver.Remote(command_executor=executor,
desired_capabilities=capabilities, browser_profile=None)


driver.get("http://www.google.com")

element = driver.find_element_by_name("q")

element.send_keys('.')

element.get_attribute('value')


What is the expected output? What do you see instead?

The input box should contain the sent value

Selenium version:2.25.0
Grid: 2.25.0
OS:Windows
Browser:Firefox
Browser version: 14



sele...@googlecode.com

unread,
Sep 24, 2012, 12:39:59 PM9/24/12
to selenium-develope...@googlegroups.com

Comment #1 on issue 4608 by dave.h...@gmail.com: element.send_keys('.')
tries to upload a file instead of sending the key to the input box using
the grid
http://code.google.com/p/selenium/issues/detail?id=4608

Can you try replicating with a local FirefoxDriver, and with a standalone
server? I doubt this issue is specific to Selenium grid.

sele...@googlecode.com

unread,
Sep 24, 2012, 1:04:11 PM9/24/12
to selenium-develope...@googlegroups.com

Comment #2 on issue 4608 by david.bu...@theautomatedtester.co.uk:
element.send_keys('.') tries to upload a file instead of sending the key to
the input box using the grid
http://code.google.com/p/selenium/issues/detail?id=4608

part of this has been fixed in r17837

sele...@googlecode.com

unread,
Sep 25, 2012, 9:12:14 AM9/25/12
to selenium-develope...@googlegroups.com

Comment #3 on issue 4608 by bebef.1...@gmail.com: element.send_keys('.')
tries to upload a file instead of sending the key to the input box using
the grid
http://code.google.com/p/selenium/issues/detail?id=4608

Tested this with the standalone server and I got the same result.


Traceback (most recent call last):
File "sel4.py", line 17, in <module>
element.send_keys('.')

File "/home/florinstrugariu/.virtualenvs/marketplace/local/lib/python2.7/site-packages/selenium/webdriver/remote/webelement.py",
line 144, in send_keys
value = self._upload(local_file)

File "/home/florinstrugariu/.virtualenvs/marketplace/local/lib/python2.7/site-packages/selenium/webdriver/remote/webelement.py",
line 237, in _upload
raise e
selenium.common.exceptions.WebDriverException: Message: u'invalid stored
block lengths' ; Stacktrace: Method read threw an error in None


and from the standalone console:

16:10:58.993 INFO - Executing: [new session: {platform=MAC,
javascriptEnabled=true, browserName=firefox, version=14}] at URL: /session)
16:11:09.250 INFO - Done: /session
16:11:09.256 INFO - Executing:
org.openqa.selenium.remote.server.handler.GetSessionCapabilities@3edad7e at
URL: /session/1348578357317)
16:11:09.256 INFO - Done: /session/1348578357317
16:11:09.333 INFO - Executing: [get: http://www.google.com] at URL:
/session/1348578357317/url)
16:11:13.587 INFO - Done: /session/1348578357317/url
16:11:13.592 INFO - Executing: [find element: By.name: q] at URL:
/session/1348578357317/element)
16:11:15.036 INFO - Done: /session/1348578357317/element
16:11:15.042 INFO - Executing:
org.openqa.selenium.remote.server.handler.UploadFile@6c93595a at URL:
/session/1348578357317/file)
16:11:15.049 WARN - Exception thrown
java.util.zip.ZipException: invalid stored block lengths
at java.util.zip.InflaterInputStream.read(Unknown Source)
at java.util.zip.ZipInputStream.read(Unknown Source)
at java.util.zip.ZipInputStream.closeEntry(Unknown Source)
at java.util.zip.ZipInputStream.getNextEntry(Unknown Source)
at org.openqa.selenium.io.Zip.unzip(Zip.java:145)
at org.openqa.selenium.io.Zip.unzip(Zip.java:123)
at
org.openqa.selenium.remote.server.handler.UploadFile.call(UploadFile.java:44)
at
org.openqa.selenium.remote.server.handler.UploadFile.call(UploadFile.java:1)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at
org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:150)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
16:11:15.053 WARN - Exception: invalid stored block lengths


sele...@googlecode.com

unread,
Sep 25, 2012, 9:13:25 AM9/25/12
to selenium-develope...@googlegroups.com

Comment #4 on issue 4608 by bebef.1...@gmail.com: element.send_keys('.')
tries to upload a file instead of sending the key to the input box using
the grid
http://code.google.com/p/selenium/issues/detail?id=4608

also the issue is not reproducible using the Firefox driver:

driver = webdriver.Firefox()

sele...@googlecode.com

unread,
Sep 27, 2012, 4:04:21 PM9/27/12
to selenium-develope...@googlegroups.com

Comment #5 on issue 4608 by barancev: element.send_keys('.') tries to
upload a file instead of sending the key to the input box using the grid
http://code.google.com/p/selenium/issues/detail?id=4608

Issue 4605 has been merged into this issue.

sele...@googlecode.com

unread,
Sep 28, 2012, 2:50:03 AM9/28/12
to selenium-develope...@googlegroups.com
Updates:
Labels: Lang-Python

Comment #6 on issue 4608 by barancev: element.send_keys('.') tries to
upload a file instead of sending the key to the input box using the grid
http://code.google.com/p/selenium/issues/detail?id=4608

(No comment was entered for this change.)

sele...@googlecode.com

unread,
Dec 4, 2012, 11:39:23 AM12/4/12
to selenium-develope...@googlegroups.com

Comment #7 on issue 4608 by redcoelh...@gmail.com: element.send_keys('.')
tries to upload a file instead of sending the key to the input box using
the grid
http://code.google.com/p/selenium/issues/detail?id=4608

I also get this with HtmlUnit
DesiredCapabilities.HTMLUNITWITHJS

sele...@googlecode.com

unread,
Jan 18, 2013, 7:47:26 PM1/18/13
to selenium-develope...@googlegroups.com
Updates:
Status: Fixed

Comment #8 on issue 4608 by luke.semerau: element.send_keys('.') tries to
upload a file instead of sending the key to the input box using the grid
http://code.google.com/p/selenium/issues/detail?id=4608

This issue was closed by revision d9fd10fa7504.

Reply all
Reply to author
Forward
0 new messages