browserstack / browserstack-local-java

Java bindings for BrowserStack Local
https://www.browserstack.com
MIT License
18 stars 34 forks source link

BrowserStack Local doesn't work with IP geolocation #40

Open ghost opened 5 years ago

ghost commented 5 years ago

Summary

BrowserStack recently release new feature IP geolocation is great option to test website by IP spoofing for different regions. (e.g. GDPR testing) but BrowserStack local doesn't work with browserstack.geoLocation capability.

Expected Behavior

if browserstack.geoLocation capability specified then we expect the network traffic simulation by IP spoofing through local network.

Actual Behavior

All network calls passed without local network as a effect, The http://localhost:XXX is not reachable

Steps to Reproduce the Problem

  1. Start BS Local with some local identifier Test1
  2. Run below java code
        capabilities.setCapability("browser", "Chrome");
        capabilities.setCapability("browserstack.local", "true");
        capabilities.setCapability("browserstack.localIdentifier", "Test1");
        WebDriver driver = new RemoteWebDriver(new URL("http://" + username + ":" + accessKey + "@hub-cloud.browserstack.com/wd/hub"), capabilities);
        driver.get("https://localhost:8080/");

browserstack local arguments

./BrowserStackLocal --key XXXXXXXXXXXX --force --forcelocal --local-identifier Test1

Platform details

  1. browserstack-local-java version: 1.0.3 or 1.0.2
  2. java version: 1.8
  3. os type and version: Mac
Raj-7799 commented 4 years ago

@vikas-thange-twc Local testing is meant route traffic from BrowserStack to your servers through your network. Whereas IP geolocation is meant to route traffic from BrowserStack to yours servers through servers from other countries. So, logically these two features can't co-exist. Supposingly even if we allowed these two features simultaneously the IP address accessing your servers would be your network IP, because of Local Testing. And hence we don't allow local testing with IP geolocation. We currently don't have a feature where BrowserStackLocal spoofs your IP address.

I hope this answers your concern.