Closed arya6000 closed 7 years ago
Not currently but it's using Apache HttpComponents which can do that
If it's using HttpComponents then it should be easy to implement. Do you think this is something that will get added soon?
There are a number of higher priority things right now. I think the main work for this would be in https://github.com/MachinePublishers/jBrowserDriver/blob/master/src/com/machinepublishers/jbrowserdriver/StreamConnectionClient.java and https://github.com/MachinePublishers/jBrowserDriver/blob/master/src/com/machinepublishers/jbrowserdriver/Settings.java
I did some digging and I think the relevant file would be
Because the bind setting would be passed to "RequestConfig" I will try to implement it and post my progress.
Makes sense. Would be happy to merge a PR. Let me know if you need anything.
I started working on it, I think everything is done but there is only one part of the code which I don't understand. In the Settings class there is a section called
private Settings(Settings.Builder builder, Map properties) {
.........
}
I think the above method is responsible for setting the final data members am I right? all the other parts are done. I will try to understand what is going on with the method above.
That class has become a little unwieldy. Yes, it's taking the mutable properties and making them final.
The complexity in that method is due to the ability to construct a Settings object not just from Settings.Builder but also from Selenium Capabilities and also have System properties control the settings.
Not every setting can be controlled by Capabilities or System properties. It's fine to not handle that part. Thus it could be as simple as this.fooSetting = builder.fooSetting
. The typical line in that method looks like this.fooSetting = parse(properties, PropertyName.FOO_SETTING, builder.fooSetting);
so that it can pull Selenium Capabilities or System properties out of that properties object.
I just tested it and it works flawlessly. Let me know how you want me to give you the changes. I have never used git, but I can learn. Or I can paste the changes here
Great. Thanks! Can you can go here and "sign" the contributor's license agreement (it's short/simple): https://github.com/MachinePublishers/jBrowserDriver/blob/master/CLA-rev2-digital.txt ... you don't need git for that just click the edit button.
You can use the edit button to change the other files pasting in your version or attaching them to a comment here.
I added my name to that file, I will double check everything and post my code soon.
I manually edited the files and I added the methods and method calls. Let me know if there are any issues. It's my first time using github.
Thanks again for contributing this! Note I renamed setLocalIp
to localIp
. This is now released in v0.17.6 on Maven Central repo.
Does jBrowserDriver have the ability to bind to a specific network interface? My computer has two NICs and I would like to tell jBrowserDriver which one to use.