IP Geolocation does not work with Local tests
Learn how to resolve the IP Geolocation not available for Local sessions
warning in your tests.
Issue
When you run a test using BrowserStack Automate, the following warning might appear on the Issues Detected tab in the Automate dashboard:
IP Geolocation not available for Local sessions
Cause
IP Geolocation is an enterprise-only feature. This feature allows your test script to simulate an IP address of another location when accessing the website under test. It is used in a test script by setting browserstack.geoLocation
capability to the country code of choice.
Local testing allows you to perform tests on your locally hosted websites or websites located behind corporate firewalls. It is used in a test script by setting the browserstack.local
to true
.
If you add these capabilities together in your test script, the browserstack.local
is given priority, while the browserstack.geoLocation
capability is ignored.
Consider an example of an application server located in the US. A user located in India wants to test traffic to this application server from the UK.
If the user wants to perform Local testing, the application server needs the traffic to originate from the user’s machine in India. If the user wants to test IP Geolocation, where the user simulates the UK location, the application server needs the traffic to originate from the UK.
Both these use cases are mutually exclusive and not currently feasible on BrowserStack, which leads to the warning.
Resolution/Workaround
To resolve this warning, based on your use case, use either of the two capabilities.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!