I'm trying to use selenium with HtmlUnit
in my Django
app. This is my procedure:
I start in background: java -jar selenium-server-standalone-2.27.0.jar
bg
I use this code:
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.remote.webdriver import WebDriver
url = "www.google.com"
driver = WebDriver("http://127.0.0.1:4444/wd/hub", DesiredCapabilities.HTMLUNITWITHJS)
driver.get(url)
text = driver.page_source
...
My problem is that I get always urlopen
error [Errno 111] Connection refused". Have you any idea?