We need to create the Driver.py file under the base package and create a class as Driver and then create a method in that class as getDriverMethod().
Under this method we need to define desired capabilities and return the driver object.
DriverClass.py
from appium import webdriver from AppiumFrameWork.configurationfiles import DeviceConfig as dc class Driver: def getDriverMethod(self): desired_caps = {} desired_caps['platformName'] = dc.platformVersion desired_caps['platformVersion'] = dc.platformVersion desired_caps['deviceName'] = 'Pixel' desired_caps['automationName'] = 'uiautomator2' desired_caps['app'] = ('/Skill2Lead/Appium_Demo_App/Android/Android_Appium_Demo.apk') desired_caps['appPackage'] = 'com.skill2lead.appiumdemo' desired_caps['appActivity'] = 'com.skill2lead.appiumdemo.MainActivity' driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", desired_caps) return driver