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;
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
add a comment |
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
add a comment |
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
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
python-3.x selenium selenium-chromedriver
asked Mar 25 at 14:51


keepomenkeepomen
557 bronze badges
557 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
);
);
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%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
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.
add a comment |
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.
add a comment |
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.
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.
answered Mar 25 at 15:45
supputurisupputuri
4,7111 gold badge8 silver badges20 bronze badges
4,7111 gold badge8 silver badges20 bronze badges
add a comment |
add a comment |
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.
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.
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%2f55340538%2frunning-scripts-without-downloading-chromedriver%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