Identify the correct piece of code for executing a single tab function in Appium.
public static void function(Appium Driver driver, Mobile Element element){){
try {
TouchActions action = new TouchActions(driver);
action.singleTap(element);
action.perform();
}
catch (Exception e) {
Log.fail("Unable to perform function" + e.getMessage(), driver);
}
}
public static void function(AndroidDriver driver, MobileElement element){){
try {
TouchActions action = new TouchActions(driver);
action.singleTap(element);
action.perform();
}
catch (Exception e) {
Log.fail("Unable to perform function" + e.getMessage(), driver);
}
}
public static void function(AppiumDriver driver, MobileElement element){){
try {
Actions action = new Actions(driver);
action.singleTap(element);
action.perform();
}
catch (Exception e) {
Log.fail("Unable to perform function" + e.getMessage(), driver);
}
}
public static void function(AppiumDriver driver, MobileElement element){){
try {
Actions action = new Actions(driver);
action.singleTap(element);
action.perform();
}
catch (Exception e) {
Log.fail("Unable to perform function" + e.getMessage(), driver);
}