In Selenium Webdriver , I am working on Python in Pycharm In which I am using simple class in which two methods are called to open URL in Chrome and Safari respectively.
from selenium import webdriver
class Automation():
def Safari(self):
driver = webdriver.Safari()
driver.get('https://bizplace.theentertainerme.com')
def Chrome(self):
driver = webdriver.Chrome('/usr/local/bin/chromedriver')
driver.get('https://bizplace.theentertainerme.com')
auto = Automation
auto.Safari(self)
Now After Executing it, I am getting an error like this:
auto.Safari(self)
NameError: name 'self' is not defined
I am trying to install self package via command line, its throwing me an error like this:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/hh/bwg2n8w54cd7852cx91v21qm0000gp/T/pip-build-XVmlLB/public/setup.py", line 28, in <module>
setup_cfg_data = read_configuration(path)
File "/private/var/folders/hh/bwg2n8w54cd7852cx91v21qm0000gp/T/pip-build-XVmlLB/public/setup.py", line 23, in read_configuration
val = open(val).read()
IOError: [Errno 2] No such file or directory: './README.rst'
Can some one help me here.