Python Forum
Can not point to Selenium Webdriver path for Python Jupyter Notebook on Azure
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can not point to Selenium Webdriver path for Python Jupyter Notebook on Azure
#1
Hi,
I am running Python Jupyter notebooks on https://notebooks.azure.com in browser (can't install anything on my office laptop, and this has been a salvation), but for Selenium framework, I am unable to make WebDriver work - the error message:

WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/...river/home

Also, uploading the chromedriver.exe file to library and directly pointing to it did not help either.

driver = webdriver.Chrome('/home/nbuser/library/chromedriver.exe')

Any suggestions for a solution?

Thanks!
Reply
#2
chromedriver.exe need to be in Environment Variables Path or in same folder as you run script from.
A basic setup,so i have cmder bin folder set in Path:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
import time

#--| Setup
chrome_options = Options()
browser = webdriver.Chrome(executable_path=r'C:\cmder\bin\chromedriver.exe')
#--| Parse or automation
browser.get('https://duckduckgo.com')
input_field = browser.find_elements_by_css_selector('#search_form_input_homepage')
input_field[0].send_keys('car' + Keys.RETURN)
time.sleep(3)
images_link = browser.find_elements_by_link_text('Images') # Or name your country use
images_link[0].click()
time.sleep(5)
browser.quit()
More setup here
Reply
#3
@snipstat, thank you for your detailed answer, but as I mentioned, I am unable to install anything on my office laptop, therefore using Jupyter Notebooks on Azure. But adding the chromedriver.exe to my user library folder and pointing the path to it driver = webdriver.Chrome('/home/nbuser/library/chromedriver.exe'), it still did not work.
So, the question is: is it possible to run Selenium for Python on Jupyter Notebooks on Microsoft Azure and where do I store the chromedriver.exe?

Thanks once again!
Reply
#4
(Nov-08-2018, 06:43 PM)dadadance Wrote: @snipstat, thank you for your detailed answer, but as I mentioned, I am unable to install anything on my office laptop, therefore using Jupyter Notebooks on Azure. But adding the chromedriver.exe to my user library folder and pointing the path to it driver = webdriver.Chrome('/home/nbuser/library/chromedriver.exe'), it still did not work.
So, the question is: is it possible to run Selenium for Python on Jupyter Notebooks on Microsoft Azure and where do I store the chromedriver.exe?

Thanks once again!

Hey, did you find the solution to this?
Reply
#5
Did you encountered problem(s) while installing package or setting project environment?
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help for script access via webdriver to an open web page in Firefox Clixmaster 1 1,214 Apr-20-2023, 05:27 PM
Last Post: farshid
  Problem with Selenium webdriver Fred 1 2,011 Jan-10-2022, 05:45 PM
Last Post: Larz60+
  Flask web app on Azure help dangermaus33 2 2,610 Aug-10-2021, 12:04 PM
Last Post: kashcode
  Cleaning HTML data using Jupyter Notebook jacob1986 7 4,052 Mar-05-2021, 10:44 PM
Last Post: snippsat
  Python Desktop Application that will connect o Azure SQL Database thewolf 7 4,443 Feb-26-2021, 01:33 AM
Last Post: thewolf
  Azure Function App Configuration Settings jdb1234 1 2,083 Oct-16-2020, 10:54 AM
Last Post: ndc85430
  How do I iterate over an array and perform actions using selenium chrome webdriver? master 0 2,387 Sep-14-2020, 05:28 AM
Last Post: master
  Which webdriver is required for selenium in Pydroid App Rahatt 1 6,243 Jul-31-2020, 01:39 AM
Last Post: Larz60+
  Log In Button Won't Click - Python Selenium Webdriver samlee916 2 3,772 Jun-07-2020, 04:42 PM
Last Post: samlee916
  Hyperlink Click is not working in Selenium webdriver rajeev1729 0 1,996 May-02-2020, 11:21 AM
Last Post: rajeev1729

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020