Open GoogleCodeExporter opened 9 years ago
...not sure what happened w/ copy/paste - all those b.get() calls pasted _did_
have closing parenthesis when run (just checked screen I copied them from)...
Original comment by yarkot1
on 27 Sep 2012 at 10:19
Continuting: chromedriver apparently hangs, not returning with the contents
of this URL (and any suburl, as in the original post):
MacBook-Pro-2:workspace yak007$ python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from selenium import webdriver
>>> b = webdriver.Chrome()
>>> b.current_url
u'about:blank'
>>> b.get("http://jama.jamanetwork.com")
>>> b.current_url ### Never returns; same, e.g., for b.page_source
^CTraceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 418, in current_url
return self.execute(Command.GET_CURRENT_URL)['value']
File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 155, in execute
response = self.command_executor.execute(driver_command, params)
File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 339, in execute
return self._request(url, method=command_info[0], data=data)
File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 381, in _request
response = opener.open(request)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 400, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 418, in _open
'_open', req)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1207, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1180, in do_open
r = h.getresponse(buffering=True)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1030, in getresponse
response.begin()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 407, in begin
version, status, reason = self._read_status()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 365, in _read_status
line = self.fp.readline()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 447, in readline
data = self._sock.recv(self._rbufsize)
KeyboardInterrupt
>>>
------------------
NOTE:
Saving this full page (any from this site) and opening that file URL does not
exhibit this problem.
Python Selenium: 2.26.0
chromedriver version=23.0.1240.0
Google Chrome Version 23.0.1271.64
Max OS/X 10.8.2 (12C60)
Original comment by yarkot1
on 22 Nov 2012 at 10:16
[deleted comment]
Previous comment may be different issue; is different driver & python-selenium
versions - posted as issue #170
Original comment by yarkot1
on 22 Nov 2012 at 10:31
I experience the same issue with the same chrome version as posted in comment
#2.
Appears to be due to the recent chrome update v23.0.1271.64
Original comment by chris.p....@gmail.com
on 22 Nov 2012 at 2:57
...also note that the operations in comment #2 work fine for other URI's, for
example - www.google.com Suggesting some interaction with the content. I
had at first suspected a buffer overflow kind of issue, which is why I tried
saving the page, but the problem doesn't repeat for that URI saved to file.
I'm guessing this is, then, some interaction with this particular URI and on
screen scripts / advertisements (appears to be virtually for every URL under
jama.jamanetwork.com).
Original comment by yarkot1
on 22 Nov 2012 at 6:51
with an update to python-selenium==2.28.0, and
Chrome Version 23.0.1271.101
(all else the same)
Some things work better, but:
$ python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from selenium import webdriver
>>> b = webdriver.Chrome()
>>> b.get("www.google.com")
>>> b.current_url
u'chrome://newtab/'
>>> b.get("http://www.google.com")
>>> b.current_url
u'http://www.google.com/'
>>> b.get("http://docs.python.org")
>>> b.current_url
u'http://docs.python.org/3/'
>>> b.get("http://jama.jamanetwork.com")
>>> b.current_url
^CTraceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 418, in current_url
return self.execute(Command.GET_CURRENT_URL)['value']
File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 155, in execute
response = self.command_executor.execute(driver_command, params)
File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 339, in execute
return self._request(url, method=command_info[0], data=data)
File "/Users/yak007/projects/workspace/Efab/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 381, in _request
response = opener.open(request)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 400, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 418, in _open
'_open', req)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1207, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1180, in do_open
r = h.getresponse(buffering=True)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1030, in getresponse
response.begin()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 407, in begin
version, status, reason = self._read_status()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 365, in _read_status
line = self.fp.readline()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 447, in readline
data = self._sock.recv(self._rbufsize)
KeyboardInterrupt
>>>
Repeated w/ last URL typed directly into browser, then issued "b.current_url"
(this is what attached log reflects)
Original comment by yarkot1
on 28 Dec 2012 at 9:33
Attachments:
Original comment by kkania@chromium.org
on 13 Mar 2013 at 11:55
Original comment by kkania@chromium.org
on 14 Mar 2013 at 9:20
Original comment by kkania@chromium.org
on 14 Mar 2013 at 9:21
Original comment by kkania@chromium.org
on 14 Mar 2013 at 10:26
I also meet the same hanging problem on the next command right after i get
value from current_url or get value with get_attribute.
I'm working on Mac using python to control chrome via webdriver 2.
Chrome version 27.0.1453.93.
Original comment by spring...@appier.com
on 5 Jun 2013 at 10:54
Original comment by samu...@chromium.org
on 21 Feb 2015 at 12:18
Unable to reproduce issue with chromedriver:2.15, chrome:v41, Mac OS X 10.9
Please try with latest versions and let us know if we differ from what you are
trying
Sample Code:
System.setProperty("webdriver.chrome.driver","drivers/chromedriver");
WebDriver driver = new ChromeDriver();
driver.get("http://www.google.com");
driver.get("http://jama.jamanetwork.com");
driver.get("http://jama.jamanetwork.com/journal.aspx");
driver.get("http://jama.jamanetwork.com/article.aspx?articleid=1104871");
Original comment by ssudunag...@chromium.org
on 13 Apr 2015 at 12:17
Original issue reported on code.google.com by
yarkot1
on 27 Sep 2012 at 10:17Attachments: