I\'ve been trying for days to setup a private proxy (with authentication) in Selenium using Firefox. However, no matter what I do I\'v been unsuccessful.
Currently,
const {Builder, By, Key, until} = require('selenium-webdriver');
const proxy = require('selenium-webdriver/proxy');
(async function example(){
let driver = await new Builder().forBrowser('firefox').setProxy(proxy.manual({
http: 'zproxy.lum-superproxy.io:22225',
https: 'zproxy.lum-superproxy.io:22225'
})).build()
try {
await driver.get('http://lumtest.com/myip.json');
driver.switchTo().alert()
.sendKeys('lum-customer-USERNAME-zone-YOURZONE'+Key.TAB+'PASSWORD');
driver.switchTo().alert().accept();
} finally {
await driver.quit();
}
})();
Here is my sample code when I use Luminati proxy for Selenium.
Find solution:
proxy = Proxy({
'proxyType': ProxyType.MANUAL,
'httpProxy': PROXY_HOST,
'socksUsername': 'name',
'socksPassword': 'pass'
})
driver = webdriver.Firefox(proxy=proxy)
You can try using browsermob proxy. Here you go for example