Skip to content

Cannot Set Geolocation - missing or invalid 'location' #331

Description

@nunessf

The problem

I can't Set Geolocation on my Android Emulator after opening the Mobile Browser. Either by setting it through Robot Framework, or by setting it up through Python.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.10.0
  • Desktop OS/version used to run Appium: Windows 10
  • Node.js version: v10.13.0
  • Npm or Yarn package manager: npm 6.4.1
  • Mobile platform/version under test: Android 8.1.0
  • Real device or emulator/simulator: Emulator (Also doesn't work on real device)
  • Appium CLI or Appium.app|exe: Appium Desktop

Details

This is the exception that is thrown:

InvalidArgumentException: Message: invalid argument: missing or invalid 'location'
  (Session info: chrome=72.0.3626.96)
  (Driver info: chromedriver=2.46.628402 (536cd7adbad73a3783fdc2cab92ab2ba7ec361e1),platform=Windows NT 10.0.16299 x86_64)

Link to Appium logs

https://gist.github.com/nunessf/df9841610c82912aa74845086ac7382b

Code To Reproduce Issue [ Good To Have ]

On Robot Framework:

Open Application    remote_url=${REMOTE URL}    
...                 platformName=${PLATFORM NAME}
...                 platformVersion=${PLATFORM VERSION}
...                 deviceName=${DEVICE NAME}
...                 browserName=Chrome
...                 automationName=UiAutomator2
Go To Url    https://www.google.pt
Set Location    11.1    22.2    33.3

On Python Library:

libraryInstances = BuiltIn().get_library_instance('', True)
if 'AppiumLibrary' in libraryInstances:
        appiumLibraryInstance = libraryInstances['AppiumLibrary']
        appiumdriver = appiumLibraryInstance._current_application()
        driver = appiumdriver    
 driver = driver.set_location(11.1,22.2,33.3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions