ContributionsMost RecentMost LikesSolutionsRe: Relative Path Selection Thanks that worked :) Relative Path Selection Hi Team, Currently, I am facing an issue, when I run my app from TC56 device the path for the button is different than the path for TC55. Eg:- I have an alert dialog that pops after the input is entered, based on the user clicking YES/NO button I have some other functionality to run. So when I run the test case on TC55 the path for 'YES Button' comes as below:- Aliases.Device.Process_post_dev.RootLayout.Layout_content.Layout_buttonPanel.Layout_NO_ID.Button_YES Layout_NO_ID this is the extra part that gets added for TC55. when I run the test case on TC56 the path for 'YES Button' comes as below:- Aliases.Device.Process_post_dev.RootLayout.Layout_content.Layout_buttonPanel.Button_Yes Is there a way I can use a relative path rather than an absolute path so that my test case works? Thanks SolvedRe: Set Mock location on Android The issue got fixed after performing the below steps:- 1. Downloaded the GPS test app the link which was given by one of the SmartBear representatives. Link - https://play.google.com/store/apps/details?id=com.chartcross.gpstest 2. Check the In View and In Use count. 3. If the count is 0 then killing the adb instance. So that count becomes greater than 0. 4. Then executing the script. 5. Created a separate script to disable the mock location rather than disabling in the same script. 6. Disabling the mock location in the same script was just setting the location first and then disabling it and on UI you couldn't see any change. 7. So in short, killing the adb instance and checking for the fix in GPS test app before executing the script fixed the issue. Code snippet:- function MockGPSLocation() { var Longt, Lat, Alt, Acc, Gps; // Enable GPS Mobile.Device().GPS.GPSEnabled = true; Longt = Mobile.Device().GPS.Location.Longitude; Lat = Mobile.Device().GPS.Location.Latitude; Log.Message("Original Longitude: "+Longt); Log.Message("Original Latitude: "+Lat); // Enable the "Allow mock locations" property Mobile.Device().GPS.AllowMockLocations = true; Longt = 174.8367068133983; Lat = -36.87015422083155; Alt = Mobile.Device().GPS.Location.Altitude; Acc = Mobile.Device().GPS.Location.Accuracy; // Specify a mock location Mobile.Device().GPS.SetLocation(Longt,Lat,Alt,Acc); // Output the location data Longt = Mobile.Device().GPS.Location.Longitude; Lat = Mobile.Device().GPS.Location.Latitude; Alt = Mobile.Device().GPS.Location.Altitude; Acc = Mobile.Device().GPS.Location.Accuracy; Gps = Mobile.Device().GPS.GPSEnabled; Log.Message("Longitude: "+Longt); Log.Message("Latitude: "+Lat); Log.Message("Altitude: "+Alt); Log.Message("Accuracy: "+Acc); Log.Message("GPSEnabled: "+Gps); } function DisableMockLocation() { Mobile.Device().GPS.AllowMockLocations = false; } Set Mock location on Android In geolocation testing on a TC56 device, Android Agent is not getting set as mock location app. "Select mock location app" setting in developer options is also disabled, I have attached a screenshot for the same. I am trying to access the script and show a dialog based on it. Below is code snippet which I used to set mock location. function MockGPSLocation() { var Longt, Lat, Alt, Acc, Gps; // Enable GPS Mobile.Device().GPS.GPSEnabled = true; // Enable the "Allow mock locations" property Mobile.Device().GPS.AllowMockLocations = true; Longt = 174.8367068133983; Lat = -36.87015422083155; Alt = Mobile.Device().GPS.Location.Altitude; Acc = Mobile.Device().GPS.Location.Accuracy; // Specify a mock location Mobile.Device().GPS.SetLocation(Longt,Lat,Alt,Acc); // Output the location data Longt = Mobile.Device().GPS.Location.Longitude; Lat = Mobile.Device().GPS.Location.Latitude; Alt = Mobile.Device().GPS.Location.Altitude; Acc = Mobile.Device().GPS.Location.Accuracy; Gps = Mobile.Device().GPS.GPSEnabled; Log.Message("Longitude: "+Longt); Log.Message("Latitude: "+Lat); Log.Message("Altitude: "+Alt); Log.Message("Accuracy: "+Acc); Log.Message("GPSEnabled: "+Gps); // Disable mock locations Mobile.Device().GPS.AllowMockLocations = false; } Solved