WebDriver -> AndroidDriver

Hello, i’m intern in a company that have an automation test with selenium, they use webDriver, and i use android driver with my appium tests.
I use a lot of code already implemented and i should just copy that code and replace WebDriver by AndroidDriver … that is ennoying and i want to integrate in the existant code not just copy classes … if you can give me an advice or a patron to follow it’s could be really nice.


It depends on framework u r following…

Don’t replace webDriver instance with AndroidDriver. Add u r android driver instance in existing code in such a way that it can use all the functions which webdriver instance can use.

i was wrong sorry, i have some case where i should initialize at remoteDriver and some at androidDriver
if i follow what you say,
i should declare the driver as WebDriver … so in my method that ask for my driver i should cast as android each time ?