1

Hi with this code i can say to DefaultHttpClient, hey use this interfaceip for connection. So how can i say like this to phantomjsdriver.
note: sorry for my english. not my native language

Example:

DefaultHttpClient httpClient;

try {
        HttpParams params = new BasicHttpParams();
        params.setParameter(ConnRoutePNames.LOCAL_ADDRESS, InetAddress.getByName(interfaceIp));

        httpClient = new DefaultHttpClient(params);
eren
  • 31
  • 6

1 Answers1

2

Solution:

DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ConnRoutePNames.LOCAL_ADDRESS, InetAddress.getByName(interfaceIp));
this.driver = new PhantomJSDriver(caps);            
LittlePanda
  • 2,496
  • 1
  • 21
  • 33
eren
  • 31
  • 6