Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

DeprecationWarning: executable_path has been deprecated, please pass in a Service in a class object self.driver = webdriver.Chrome

=================
#FOR FUNCTIONS  =
=================
from selenium.webdriver.chrome.service import Service

def cookieClicker():
    s = Service("C:Program Files (x86)chromedriver.exe")
    driver = webdriver.Chrome(service=s)

=================
#FOR CLASSES    =
=================
from selenium.webdriver.chrome.service import Service

class PythonOrgSearch(unittest.TestCase):

    def setUp(self):
        self.driver = webdriver.Chrome(service=Service(r"C:Program Files (x86)chromedriver.exe"))
        self.driver.get("http://www.python.org")
        
        
    def test_example(self):
        print("Tested...")
        assert True
        
        
    def tearDown(self):
        self.driver.close()


if __name__ == "__main__":
    unittest.main()
Comment

PREVIOUS NEXT
Code Example
Python :: clear screen python 
Python :: python press key to break 
Python :: remove extension from filename python 
Python :: how to check in which directory python in running 
Python :: python except error as e 
Python :: python setter getter deleter 
Python :: database default code in settings django 
Python :: no module named torch 
Python :: python3 install google 
Python :: find rows not equal to nan pandas 
Python :: hwo to separate datetime column into date and time pandas 
Python :: openai gym conda 
Python :: python program to keep your computer awake 
Python :: convert pandas datetime to day, weekday, month 
Python :: ls.ProgrammingError: permission denied for table django_migrations 
Python :: cmd run ps1 file in background 
Python :: label encoder python 
Python :: Generate random image np array 
Python :: pandas uniqe values in the columns 
Python :: python keylogger 
Python :: python distance between coordinates 
Python :: python join array of ints 
Python :: matplotlib label axis 
Python :: opencv draw two images side by side 
Python :: syntax to update sklearn 
Python :: python confidence interval 
Python :: How do I set Conda to activate the base environment by default? 
Python :: fill python list with input 
Python :: how to use rmse as loss function in keras 
Python :: pil get image size 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =