FuckTheWorld / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

chromedriver sends relative urls in redirects causing python3 urllib to throw an exception #68

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download the python selenium bindings 2.21.2
2. run 2to3 on the selenium directory
3. apply the attached patch to selenium/webdriver/remote/remote_connection.py
4. Attempt to navigate to a webpage using chromedriver
5. See that the following exception occurred
"urllib.error.HTTPError: HTTP Error 303: See Other - Redirection to url 
'/session/0a5866dea13e35603602f2108eaa2562' is not allowed"

Here is an example python script that I used in python3.2:

from selenium import webdriver

browser = webdriver.Chrome()
browser.get("http://www.google.com")
items  = browser.find_elements_by_tag_name("img")
browser.quit()

Simplified test case or site demonstrating the problem:

This is caused due to a security update for urllib from this bug:
http://bugs.python.org/issue11662

What version of the product are you using? On what operating system?
ChromeDriver = 19.0.1068.0
Chrome = 18.0.1025.151
OS = Linux 3.0.0 x64

Would it be possible to send full urls instead of relative paths?

Original issue reported on code.google.com by bran...@sevensoupcans.com on 21 Apr 2012 at 8:42

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the report. I guess we need to switch to an absolute url. Just 
curious, does IE or FF have this problem too?

Original comment by kkania@chromium.org on 4 May 2012 at 1:55

GoogleCodeExporter commented 9 years ago
Firefox does not have this issue. I have not tried it with IE, but I'll
check it out and see what happens.

Original comment by bran...@sevensoupcans.com on 4 May 2012 at 2:56

GoogleCodeExporter commented 9 years ago
This is not a problem with IE. 

Original comment by bran...@sevensoupcans.com on 5 May 2012 at 5:10

GoogleCodeExporter commented 9 years ago

Original comment by kkania@chromium.org on 13 Mar 2013 at 11:55

GoogleCodeExporter commented 9 years ago

Original comment by kkania@chromium.org on 14 Mar 2013 at 9:20

GoogleCodeExporter commented 9 years ago

Original comment by kkania@chromium.org on 14 Mar 2013 at 9:21

GoogleCodeExporter commented 9 years ago

Original comment by kkania@chromium.org on 14 Mar 2013 at 9:56

GoogleCodeExporter commented 9 years ago

Original comment by kkania@chromium.org on 30 Sep 2013 at 10:52

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:19

GoogleCodeExporter commented 9 years ago
brandon

can you please verify with latest versions and please let us know if you still 
seeing the issue.

Original comment by ssudunag...@chromium.org on 9 Jun 2015 at 11:50