Mock Geolocation on Web tests - BrowserStack

Hi,
I have recorded a test on the website whatismyipaddress.com
Now i want to mock different locations so it shows different results on Web tests
Could someone guide me thanks.
I have no coding knowledge. I am just using the record and playback so please advice what i can do.

Hi @vovimay698,
If your web page is searching for your browser’s location you can use this solution:

If your web page is searching for your IP location you can use a VPN.

Hi, I tried this solution already but it didn’t work. How do i use VPN?

Because my test is running on a cloud agent so VPN on my device won’t work

Even when i tried running this script it didn’t work.

Could you please guide on how to execute the javascript? @ran.ferdinaro

@vovimay698 You can use the script in the attached answer with the ‘execute Javascript’ action.
You will need to change the latitude and longitude best on the location you want.

You can use any VPN service out there.
The most popular ones are NordVPN, ExpressVPN, etc.
Your IT can help you with connecting you to a VPN.

But VPN can only be installed on personal device how do i do it on a cloud agent like browserstack

If you are using BrowserStack, this documentation should help you.