Hello. A bunch of java + selenium-webdriver. Initialize driver and proxy:

System.setProperty("webdriver.gecko.driver", "C:\\GeckoDriver\\geckodriver.exe"); Proxy proxy = new Proxy(); proxy.setHttpProxy("62.122.100.90:8080"); DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(CapabilityType.PROXY, proxy); driver = new FirefoxDriver(capabilities); 

Then I try to open 2ip to check if the connection is proxied:

 driver.get(sAdress); 

IP address is determined by the native. Tell me, please, where to "dig"? Thank you in advance.

  • one
    capabilities = DesiredCapabilities.firefox(); Need to use - Senior Pomidor
  • Thanks, I will try - I will unsubscribe. - Cenzor
  • changed to capabilities = new DesiredCapabilities().firefox() - does not work, same native ip-address - Cenzor
  • Understood. Opened the browser with the firefox -p command, set up a proxy server in the "default" profile. In the code, I indicated which profile to load: FirefoxProfile profile = new ProfilesIni().getProfile("default"); driver = new FirefoxDriver(profile); FirefoxProfile profile = new ProfilesIni().getProfile("default"); driver = new FirefoxDriver(profile); - Cenzor

0