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.










share|improve this question






















  • 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) 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















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.










share|improve this question






















  • 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) 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













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.










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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 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


















  • 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) 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
















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












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")





share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    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

























    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")





    share|improve this answer

























      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")





      share|improve this answer























        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")





        share|improve this answer












        try



        driver = webdriver.Remote(
        command_executor='http://selenium-hub:4444/wd/hub',
        desired_capabilities=DesiredCapabilities.CHROME)
        driver.get("https://google.com")






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 11 at 4:35









        Hung Pham

        712




        712






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Bressuire

            Vorschmack

            Quarantine