[Tutor] cannot find html file, in the same dir as python file
Alan Gauld
alan.gauld at yahoo.co.uk
Mon Sep 5 20:25:27 EDT 2016
On 05/09/16 21:59, monikajg at netzero.net wrote:
> chromedriver = "resources/chromedriver"
> os.environ["webdriver.chrome.driver"] = chromedriver
> self.driver = webdriver.Chrome(chromedriver)
> base_url = 'button.html'
> self.driver.get(base_url)
>
> FileNotFoundError: [WinError 2] The system cannot find the file specified
> Even though this is in Selenium this is a python question. I think.
Have you tried giving it the full path?
Have you tried asking Python where it is looking, eg
print( os.getcwd() )
Just in case Python is not running where you think
it is - I can't remember how windows decides... and
its better not to guess anyway.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list