Set Geo Location on Google map by passing latitute and longitude in Appium

I have to set Geo location by passing lat and long . But Google map automatically setting current location when app started. I have to pass lat and long and set the GPS location according to lat and long in Appium

It is showing error
Showing error FAILED CONFIGURATION: @BeforeClass setUp org.openqa.selenium.WebDriverException: ERROR running Appium command: port should be string=false

Below is the code I have written correct me if I am wrong

package Test;
import io.appium.java_client.AppiumDriver;

import java.util.Set;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.html5.Location;
//import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.annotations.*;

public class FullHouse {
WebDriver driver;

public void setUp() throws MalformedURLException{
//Set up desired capabilities and pass the Android app-activity and app-package to Appium
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“BROWSER_NAME”, “”);
capabilities.setCapability(“platformVersion”, “5.1”);

//It will launch the Calculator App in Android Device using the configurations specified in Desired Capabilities
//driver = new RemoteWebDriver(new URL(““), capabilities);

AppiumDriver driver = new AndroidDriver(new URL(““), capabilities);
// WebDriver driver = new AndroidDriver(new URL(“”),getDesiredCapabilities(““));
Location location = new Location(77.59974003, 12.91024781, 909);
driver.manage().timeouts().implicitlyWait(200, TimeUnit.SECONDS);
//driver.manage().timeouts().implicitlyWait(100, TimeUnit.SECONDS);


public void testCal() throws Exception {
Some test here


public void teardown(){
//close the app

Default Asked on December 26, 2016 in Appium.
Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.