can't connect to Selenium server from vagrant machine
up vote
0
down vote
favorite
i built my first web project on a vagrant machine. I would like to run some browser tests with selenium. i have the tests (and rest of project) on virtual machine.
it appears that I can use selenium server standalone to connect to my local machine and run the browsers on the local machine.
On the local machine, I run the following: java -jar selenium-server-standalone-3.8.1.jar
I get a bunch of successful code including: osjs.AbstractConnector:main: Started ServerConnector@709a8be8{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
Presumably, that is where i can connect from my virtual machine.
I then have a small python script:
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
driver = webdriver.Remote(
command_executor='http://0.0.0.0:4444',
desired_capabilities=DesiredCapabilities.CHROME)
driver.get("http://www.python.org")
I get the following error: urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
I can't find much more detail on this process than these steps. If someone could help with this problem, I'd be grateful.
django selenium vagrant
add a comment |
up vote
0
down vote
favorite
i built my first web project on a vagrant machine. I would like to run some browser tests with selenium. i have the tests (and rest of project) on virtual machine.
it appears that I can use selenium server standalone to connect to my local machine and run the browsers on the local machine.
On the local machine, I run the following: java -jar selenium-server-standalone-3.8.1.jar
I get a bunch of successful code including: osjs.AbstractConnector:main: Started ServerConnector@709a8be8{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
Presumably, that is where i can connect from my virtual machine.
I then have a small python script:
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
driver = webdriver.Remote(
command_executor='http://0.0.0.0:4444',
desired_capabilities=DesiredCapabilities.CHROME)
driver.get("http://www.python.org")
I get the following error: urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
I can't find much more detail on this process than these steps. If someone could help with this problem, I'd be grateful.
django selenium vagrant
http://0.0.0.0:4444
should replace to your loal machin IP address, rathan 0.0.0.0 And you need to make sure the virtual machine can access your local machine , like ping <local machine IP address> from virtual machine
– yong
Jan 15 at 1:51
how do i find my local machine IP address?
– Ry John
Jan 15 at 1:54
For windows, execute ipconfig in cmd window, for linux, execute ifconfig on local machine, or google search guide
– yong
Jan 15 at 1:55
IMO, you need to update the question if you are usingselenium server
(as per question heading) orselenium grid - hub/node config
(as per code block)
– DebanjanB
Jan 15 at 10:31
wasn't even aware of the distinction. where does the code block reference "selenium grid"?
– Ry John
Jan 16 at 0:51
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
i built my first web project on a vagrant machine. I would like to run some browser tests with selenium. i have the tests (and rest of project) on virtual machine.
it appears that I can use selenium server standalone to connect to my local machine and run the browsers on the local machine.
On the local machine, I run the following: java -jar selenium-server-standalone-3.8.1.jar
I get a bunch of successful code including: osjs.AbstractConnector:main: Started ServerConnector@709a8be8{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
Presumably, that is where i can connect from my virtual machine.
I then have a small python script:
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
driver = webdriver.Remote(
command_executor='http://0.0.0.0:4444',
desired_capabilities=DesiredCapabilities.CHROME)
driver.get("http://www.python.org")
I get the following error: urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
I can't find much more detail on this process than these steps. If someone could help with this problem, I'd be grateful.
django selenium vagrant
i built my first web project on a vagrant machine. I would like to run some browser tests with selenium. i have the tests (and rest of project) on virtual machine.
it appears that I can use selenium server standalone to connect to my local machine and run the browsers on the local machine.
On the local machine, I run the following: java -jar selenium-server-standalone-3.8.1.jar
I get a bunch of successful code including: osjs.AbstractConnector:main: Started ServerConnector@709a8be8{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
Presumably, that is where i can connect from my virtual machine.
I then have a small python script:
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
driver = webdriver.Remote(
command_executor='http://0.0.0.0:4444',
desired_capabilities=DesiredCapabilities.CHROME)
driver.get("http://www.python.org")
I get the following error: urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
I can't find much more detail on this process than these steps. If someone could help with this problem, I'd be grateful.
django selenium vagrant
django selenium vagrant
asked Jan 14 at 20:01
Ry John
156110
156110
http://0.0.0.0:4444
should replace to your loal machin IP address, rathan 0.0.0.0 And you need to make sure the virtual machine can access your local machine , like ping <local machine IP address> from virtual machine
– yong
Jan 15 at 1:51
how do i find my local machine IP address?
– Ry John
Jan 15 at 1:54
For windows, execute ipconfig in cmd window, for linux, execute ifconfig on local machine, or google search guide
– yong
Jan 15 at 1:55
IMO, you need to update the question if you are usingselenium server
(as per question heading) orselenium grid - hub/node config
(as per code block)
– DebanjanB
Jan 15 at 10:31
wasn't even aware of the distinction. where does the code block reference "selenium grid"?
– Ry John
Jan 16 at 0:51
add a comment |
http://0.0.0.0:4444
should replace to your loal machin IP address, rathan 0.0.0.0 And you need to make sure the virtual machine can access your local machine , like ping <local machine IP address> from virtual machine
– yong
Jan 15 at 1:51
how do i find my local machine IP address?
– Ry John
Jan 15 at 1:54
For windows, execute ipconfig in cmd window, for linux, execute ifconfig on local machine, or google search guide
– yong
Jan 15 at 1:55
IMO, you need to update the question if you are usingselenium server
(as per question heading) orselenium grid - hub/node config
(as per code block)
– DebanjanB
Jan 15 at 10:31
wasn't even aware of the distinction. where does the code block reference "selenium grid"?
– Ry John
Jan 16 at 0:51
http://0.0.0.0:4444
should replace to your loal machin IP address, rathan 0.0.0.0 And you need to make sure the virtual machine can access your local machine , like ping <local machine IP address> from virtual machine– yong
Jan 15 at 1:51
http://0.0.0.0:4444
should replace to your loal machin IP address, rathan 0.0.0.0 And you need to make sure the virtual machine can access your local machine , like ping <local machine IP address> from virtual machine– yong
Jan 15 at 1:51
how do i find my local machine IP address?
– Ry John
Jan 15 at 1:54
how do i find my local machine IP address?
– Ry John
Jan 15 at 1:54
For windows, execute ipconfig in cmd window, for linux, execute ifconfig on local machine, or google search guide
– yong
Jan 15 at 1:55
For windows, execute ipconfig in cmd window, for linux, execute ifconfig on local machine, or google search guide
– yong
Jan 15 at 1:55
IMO, you need to update the question if you are using
selenium server
(as per question heading) or selenium grid - hub/node config
(as per code block)– DebanjanB
Jan 15 at 10:31
IMO, you need to update the question if you are using
selenium server
(as per question heading) or selenium grid - hub/node config
(as per code block)– DebanjanB
Jan 15 at 10:31
wasn't even aware of the distinction. where does the code block reference "selenium grid"?
– Ry John
Jan 16 at 0:51
wasn't even aware of the distinction. where does the code block reference "selenium grid"?
– Ry John
Jan 16 at 0:51
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
try
driver = webdriver.Remote(
command_executor='http://selenium-hub:4444/wd/hub',
desired_capabilities=DesiredCapabilities.CHROME)
driver.get("https://google.com")
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
try
driver = webdriver.Remote(
command_executor='http://selenium-hub:4444/wd/hub',
desired_capabilities=DesiredCapabilities.CHROME)
driver.get("https://google.com")
add a comment |
up vote
0
down vote
try
driver = webdriver.Remote(
command_executor='http://selenium-hub:4444/wd/hub',
desired_capabilities=DesiredCapabilities.CHROME)
driver.get("https://google.com")
add a comment |
up vote
0
down vote
up vote
0
down vote
try
driver = webdriver.Remote(
command_executor='http://selenium-hub:4444/wd/hub',
desired_capabilities=DesiredCapabilities.CHROME)
driver.get("https://google.com")
try
driver = webdriver.Remote(
command_executor='http://selenium-hub:4444/wd/hub',
desired_capabilities=DesiredCapabilities.CHROME)
driver.get("https://google.com")
answered Nov 11 at 4:35
Hung Pham
712
712
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f48253652%2fcant-connect-to-selenium-server-from-vagrant-machine%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
http://0.0.0.0:4444
should replace to your loal machin IP address, rathan 0.0.0.0 And you need to make sure the virtual machine can access your local machine , like ping <local machine IP address> from virtual machine– yong
Jan 15 at 1:51
how do i find my local machine IP address?
– Ry John
Jan 15 at 1:54
For windows, execute ipconfig in cmd window, for linux, execute ifconfig on local machine, or google search guide
– yong
Jan 15 at 1:55
IMO, you need to update the question if you are using
selenium server
(as per question heading) orselenium grid - hub/node config
(as per code block)– DebanjanB
Jan 15 at 10:31
wasn't even aware of the distinction. where does the code block reference "selenium grid"?
– Ry John
Jan 16 at 0:51