Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

clearLocation()

SEO Metadata
titleSeeTest Automation- Clear Location

The command gives the ability to reset the device’s location services after the user executes the SeeTestAutomation- SetLocation command.

Supported_os
SupportAndroidtrue

Description

The command gives the ability to reset the device’s location services after the user executes the SeeTestAutomation- SetLocation command.


Info

Notes:

  • In Android, command supported since Android 4.4.
  • Pre-requests: Enable the location provider service you wish to work with, by:
    • For Android:
      • SetProperty. For example:
        • if you want to the command to work based on GPS only .i.e. 'Device Only Mode', prior to clearLocarion, you can call:

          Code Block
          languagejava
          client.setProperty("location.service.gps", "true");
          client.setProperty("location.service.network", "false");
        • if you want to the command to work based on GPS and Network .i.e. 'High Accuracy Mode', prior to clearLocarion, you can call:

          Code Block
          languagejava
          client.setProperty("location.service.gps", "true");
          client.setProperty("location.service.network", "true");
    • For iOS:
      • on your device: Go to: Setting >> Privacy >> Location Services >> enable "Locations Services".


Code Examples

Code Block
languagejava
titleJava Example
linenumberstrue
client.clearLocation();
Code Block
languagec#
titleC# Example
linenumberstrue
collapsetrue
client.ClearLocation();
Code Block
languagevb
titleVBScript Example
linenumberstrue
collapsetrue
client.ClearLocation 
Report
Code Block
languagepy
titlePython Example
linenumberstrue
collapsetrue
self.client.clearLocation()
Code Block
languageperl
titlePerl Example
linenumberstrue
collapsetrue
$client->clearLocation();