def getDriver(self,phoneName): global desireCap global androidDriver configReader = Config() desireCap = configReader.getDesiredCap(phoneName) androidDriver = webdriver.Remote(desireCap['url'],desireCap) return androidDriver
def getDriver(self,phoneName): self.desireCap = Config.getDesiredCap(phoneName) try: self.driver = webdriver.Remote(self.desireCap['url'],self.desireCap) except Exception as err: print("Initializing Driver error") return self.driver