I used to have a selenium script code in Python for a firefox website that worked fine.After a while I updated Firefox (48) and selenium 2.9.1.1, python is 3.5.0
the code,
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
import unittest, time, re, os
class Jqueryx(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(30)
self.base_url = "http://127.0.0.1:8080/"
self.verificationErrors = []
self.accept_next_alert = True
self.path_upload_quest = r'C:\\Users\jl\Documents\DONNEES\DONNEES_LIMONDE'
self.path_upload_ref = r'C:\\Users\jl\Documents\DONNEES\DONNEES_LIMONDE\ref'
def test_jqueryx(self):
driver = self.driver
driver.get(self.base_url + "/lim/home.php")
If I run the script now i ve got this message:
os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: 'geckodriver' >executable needs to be in PATH.
So I download this geckodriver thing and try to add it to the python but nothing works yet,
I try to add this in the script;
os.environ["PATH"] += r'C:\Users\jl\geckodriver'
without success or adding a .pth file in the site-package folder but no change too...
What can I do to get this script back on track ?
thx