I have started learning appium recently, and I created some basic tests to launch an application, I referred a lot of guides and tutorials before creating the test scrips. Something I noticed was that different individuals has used different methods to create the driver. I tried using 3 methods that I picked up which I have mentioned below and all 3 methods are working. Im really confused on which method should I use when I'm writing test scrips in the future and is there any other method to create the driver.
Method 1
AppiumDriver<MobileElement> driver = new AndroidDriver<MobileElement>(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
Method 2
WebDriver driver = new RemoteWebDriver(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
Method 3
AndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
here are some of the guides that i used to create the test scripts and describing the different types of drivers available
http://www.automationtestinghub.com/first-appium-test-script/
If I create a driver in selenium I would be using the following syntax, which is the accepted method used when creating a driver for the test scripts
WebDriver driver = new ChromeDriver();
It would be great if someone could explain why different individuals use different methods instead when creating drivers in Appium and which is the best method for creating a driver for android automation scripts using java.