Running scripts without downloading chromedriverGet HTML Source of WebElement in Selenium WebDriver using PythonHow can I control Chromedriver open window size?Passing require('chromedriver).path directly to selenium-webdriverCan a website detect when you are using selenium with chromedriver?Absolute Path Selenium Chromedriver Ubuntu (Python)Message: 'chromedriver' executable needs to be in PATHPython selenium CTRL+C closes chromedriverRun Selenium with chromedriver in JenkinsChromedriver working in path but not with selenium (python)How to include chromedriver executable in Pyinstaller so that it works for computers that do not have chromedriver?

Why was Pan Am Flight 103 flying over Lockerbie?

Can I use Alchemist's fire to turn my sword into a virtual Flame Blade?

Closest Proximity of Oceans to Freshwater Springs

What happens if a caster is surprised while casting a spell with a long casting time?

List manipulation: conditional result based on variable-length sublists

Undetectable mail tracker

How can I open this door latch with the knobs removed?

How to describe POV characters?

Is it okay to submit a paper from a master's thesis without informing the advisor?

When casting a spell with a long casting time, what happens if you don't spend your action on a turn to continue casting?

Fully submerged water bath for stove top baking?

Having to constantly redo everything because I don't know how to do it?

Active wildlife outside the window- Good or Bad for Cat psychology?

Why would anyone even use a Portkey?

Bin Packing with Relational Penalization

How do I present a future free of gender stereotypes without being jarring or overpowering the narrative?

List Manipulation : a,b,c,d,e,f,g,h into a,b,c,d,e,f,g,h

How could an armless race establish civilization?

Making a wall made from glass bricks

"I am [the / an] owner of a bookstore"?

Could you fall off a planet if it was being accelerated by engines?

Converting Geographic Coordinates into Lambert2008 coordinates

Journal standards vs. personal standards

Prime in substituted benzene



Running scripts without downloading chromedriver


Get HTML Source of WebElement in Selenium WebDriver using PythonHow can I control Chromedriver open window size?Passing require('chromedriver).path directly to selenium-webdriverCan a website detect when you are using selenium with chromedriver?Absolute Path Selenium Chromedriver Ubuntu (Python)Message: 'chromedriver' executable needs to be in PATHPython selenium CTRL+C closes chromedriverRun Selenium with chromedriver in JenkinsChromedriver working in path but not with selenium (python)How to include chromedriver executable in Pyinstaller so that it works for computers that do not have chromedriver?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I would like to know the easiest way to run the Python script on another computer.
I can compile a script in exe through PyInstaller and cx_Freeze.
How can this be done without changing the script path (driver = webdriver.Chrome('C:pychromedriver')) to ChromeDriver?










share|improve this question




























    0















    I would like to know the easiest way to run the Python script on another computer.
    I can compile a script in exe through PyInstaller and cx_Freeze.
    How can this be done without changing the script path (driver = webdriver.Chrome('C:pychromedriver')) to ChromeDriver?










    share|improve this question
























      0












      0








      0








      I would like to know the easiest way to run the Python script on another computer.
      I can compile a script in exe through PyInstaller and cx_Freeze.
      How can this be done without changing the script path (driver = webdriver.Chrome('C:pychromedriver')) to ChromeDriver?










      share|improve this question














      I would like to know the easiest way to run the Python script on another computer.
      I can compile a script in exe through PyInstaller and cx_Freeze.
      How can this be done without changing the script path (driver = webdriver.Chrome('C:pychromedriver')) to ChromeDriver?







      python-3.x selenium selenium-chromedriver






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 25 at 14:51









      keepomenkeepomen

      557 bronze badges




      557 bronze badges






















          1 Answer
          1






          active

          oldest

          votes


















          1














          Generally we will place all the required drivers in the project and then provide the path to the driver in the project. something like this below



          project
          drivers
          tests
          any other folders


          Now you can access place all the drivers in the drivers folder and access them as below.



          def get_full_path_to_folder(folderName):
          folders = os.path.abspath(os.pardir).split(os.sep)
          folderPath = ''
          for folder in folders:
          if folderPath == '':
          folderPath = folder
          else:
          folderPath = folderPath + "\" +folder
          if os.path.isdir(os.path.join(folderPath, folderName)):
          return os.path.join(folderPath, folderName)
          break

          driver = webdriver.Chrome(executable_path=os.path.join(get_full_path_to_folder('drivers'), "chromedriver.exe"))


          By this way drivers will go with the .exe that you are planning.






          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',
            autoActivateHeartbeat: false,
            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%2f55340538%2frunning-scripts-without-downloading-chromedriver%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









            1














            Generally we will place all the required drivers in the project and then provide the path to the driver in the project. something like this below



            project
            drivers
            tests
            any other folders


            Now you can access place all the drivers in the drivers folder and access them as below.



            def get_full_path_to_folder(folderName):
            folders = os.path.abspath(os.pardir).split(os.sep)
            folderPath = ''
            for folder in folders:
            if folderPath == '':
            folderPath = folder
            else:
            folderPath = folderPath + "\" +folder
            if os.path.isdir(os.path.join(folderPath, folderName)):
            return os.path.join(folderPath, folderName)
            break

            driver = webdriver.Chrome(executable_path=os.path.join(get_full_path_to_folder('drivers'), "chromedriver.exe"))


            By this way drivers will go with the .exe that you are planning.






            share|improve this answer



























              1














              Generally we will place all the required drivers in the project and then provide the path to the driver in the project. something like this below



              project
              drivers
              tests
              any other folders


              Now you can access place all the drivers in the drivers folder and access them as below.



              def get_full_path_to_folder(folderName):
              folders = os.path.abspath(os.pardir).split(os.sep)
              folderPath = ''
              for folder in folders:
              if folderPath == '':
              folderPath = folder
              else:
              folderPath = folderPath + "\" +folder
              if os.path.isdir(os.path.join(folderPath, folderName)):
              return os.path.join(folderPath, folderName)
              break

              driver = webdriver.Chrome(executable_path=os.path.join(get_full_path_to_folder('drivers'), "chromedriver.exe"))


              By this way drivers will go with the .exe that you are planning.






              share|improve this answer

























                1












                1








                1







                Generally we will place all the required drivers in the project and then provide the path to the driver in the project. something like this below



                project
                drivers
                tests
                any other folders


                Now you can access place all the drivers in the drivers folder and access them as below.



                def get_full_path_to_folder(folderName):
                folders = os.path.abspath(os.pardir).split(os.sep)
                folderPath = ''
                for folder in folders:
                if folderPath == '':
                folderPath = folder
                else:
                folderPath = folderPath + "\" +folder
                if os.path.isdir(os.path.join(folderPath, folderName)):
                return os.path.join(folderPath, folderName)
                break

                driver = webdriver.Chrome(executable_path=os.path.join(get_full_path_to_folder('drivers'), "chromedriver.exe"))


                By this way drivers will go with the .exe that you are planning.






                share|improve this answer













                Generally we will place all the required drivers in the project and then provide the path to the driver in the project. something like this below



                project
                drivers
                tests
                any other folders


                Now you can access place all the drivers in the drivers folder and access them as below.



                def get_full_path_to_folder(folderName):
                folders = os.path.abspath(os.pardir).split(os.sep)
                folderPath = ''
                for folder in folders:
                if folderPath == '':
                folderPath = folder
                else:
                folderPath = folderPath + "\" +folder
                if os.path.isdir(os.path.join(folderPath, folderName)):
                return os.path.join(folderPath, folderName)
                break

                driver = webdriver.Chrome(executable_path=os.path.join(get_full_path_to_folder('drivers'), "chromedriver.exe"))


                By this way drivers will go with the .exe that you are planning.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 25 at 15:45









                supputurisupputuri

                4,7111 gold badge8 silver badges20 bronze badges




                4,7111 gold badge8 silver badges20 bronze badges


















                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55340538%2frunning-scripts-without-downloading-chromedriver%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

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript