I'm using Selenium and Appium to run my java project in Android mobile. I'm trying to execute on Chrome browser and everytime it runs, it asks for proxy credentials (username and password), this is because I'm connected to a network with proxy.
I've tried several methods without success:
- Passing credentials through the url: http://username:password@url.com
Settings httpproxy through capabilities.
DesiredCapabilities capabilities = DesiredCapabilities.android(); Proxy proxy = new Proxy(); proxy.setHttpProxy(proxy+":"+port); proxy.setSocksUsername(user); proxy.setSocksPassword(pw); capabilities.setCapability("proxy", proxy);
Filling the popup fields changing the context to NATIVE_APP
driver.switchTo().window("NATIVE_APP"); driver.findElement(By.id("username")).sendKeys(user); driver.findElement(By.id("password")).sendKeys(pw); driver.findElement(By.id("button1")).click();
Thank you in advance.