Hello...
Here is my code runnung in pycharm but I am able to open chrome browser. Please suggest.
test_login.py
from testresource.applicationkeywords import applicationkeywords
app = applicationkeywords() #craete object
def test_login():
app.openbrowser('chrome')
generickeywords.py
from pyjavaproperties import Properties
#from selenium.webdriver.chrome import webdriver
from selenium import webdriver
class genkeyword:
def __init__(self):
pass
self.prop = Properties()
propertiesFile = open("C:\\Users\\tbasu\\PycharmProjects\\Project\\config.properties")
self.prop.load(propertiesFile)
self.prop.list()
def openbrowser(self,browsername):
if(browsername=='chrome'):
path = "C:\\chromedriver_win32\\chromedriver.exe"
self.driver = webdriver.Chrome(executable_path=path)
print("Open Browser")
applicationkeywords.py
from testresource.generickeywords import genkeyword
from testresource.validatekeywords import validatekeywords
class applicationkeywords(genkeyword,validatekeywords): #inherit the parent class
def login(self):
pass