As a follow up on this discrepancy, I have logged this as an issue on
the Selenium bug tracking portal.
Issue : 2051
http://code.google.com/p/selenium/issues/detail?id=2051
Thanks and Regards
Krishnan Mahadevan
On Jul 13, 7:46 pm, Krishnan Mahadevan
<
krishnan.mahadevan1...@gmail.com> wrote:
> Folks,
>
> I did more playing around on this and I think I might have stumbled into a
> possible bug. Would appreciate if someone could please help take a look at
> this and confirm, so that I may try and explore alternatives on this.
>
> The sample code that can help simulate this issue, the output that I got
> from running the code and the complete exception stacktrace is available at
>
> *
https://gist.github.com/1080409*
>
> I still keep hitting *"Proxy autodetect is incompatible with manual
> settings"* even though I am setting a proxyconfiguration URL (so the
> expectation here is that the proxy type would be set to PAC)
>
> Would appreciate if someone could please help take a look at this and
> advise.
>
> *Build info: *version: '2.0.0', revision: '12817', time: '2011-07-07
> 19:14:12'
> *System info:*
os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1',
> java.version: '1.6.0_20'
> *Browser :* IE 7
>
> Thanks & Regards
> Krishnan Mahadevan
>
> "All the desirable things in life are either illegal, expensive, fattening
> or in love with someone else!"
>
> On Tue, Jul 12, 2011 at 10:50 PM, Krishnan Mahadevan <
>
>
krishnan.mahadevan1...@gmail.com> wrote:
> > Derek,
> > To the best of my knowledge that is all that I am trying to do. Any
> > pointers on what could be wrong and how it could be fixed ?
>
> > Thanks & Regards
> > Krishnan Mahadevan
>
> > "All the desirable things in life are either illegal, expensive, fattening
> > or in love with someone else!"
>
> > On Tue, Jul 12, 2011 at 9:26 PM, Derek Ekins <
de...@spathi.com> wrote:
>
> >> Looks like you are hitting:
>
> >> private void verifyProxyTypeCompatilibily(ProxyType compatibleProxy) { if (this.proxyType != ProxyType.UNSPECIFIED && this.proxyType != compatibleProxy) { throw new IllegalStateException("Proxy autodetect is incompatible with manual settings"); }
>
> >> But the code you posted looks fine to me. Are you sure nothing else is setting another type of proxy?
>
> >> I don't have my hub configuration to hand so can't comment on that sorry..
>
> >> On 12 July 2011 16:37, Krishnan Mahadevan <
> >>> *Proxy proxy = new Proxy();
> >>> proxy.setProxyAutoconfigUrl("
http://localhost:8080/proxy.pac");
> >>> DesiredCapabilities capability = new DesiredCapabilities();
> >>> capability.setBrowserName(DesiredCapabilities.internetExplorer().getBrowserName());
>
> >>> capability.setCapability(CapabilityType.PROXY, proxy);
> >>> RemoteWebDriver d = new RemoteWebDriver(new URL("
> >>>
http://myhub:4444/wd/hub"), capability);
>
> >>> Selenium s = new WebDriverBackedSelenium(d, "
http://www.google.com");
>
> >>> *As you can see, I am not explicitly setting the Proxy auto detection
> >>> anywhere. But I still hit the same error.
>
> >>> I guess the line
> >>> *proxy.setProxyAutoconfigUrl("
http://localhost:8080/proxy.pac");
> >>> *should automatically set the proxy type to *"Proxy.ProxyType.PAC"
> >>> *
> >>> Quick question:
> >>> How should the WebDriver node connected to my hub be spawned as ?
>
> >>> I am currently using the following two lines to spawn the hub and the
> >>> webdriver node.
>
> >>> *java -jar selenium-server-standalone-2.0.0.jar -role hub
> >>> *
> >>> Would appreciate if you could please help me with this, because when
> >>> dealing with IE, I am now having to take the following ***not so
> >>> elegant*** approach:
>
> >>> - when spawning the webdriver node, add an explicit browser version
> >>> to some weird value say "9999"
> >>> - Manually configure the IE to make use of my proxy settings.
> >>> - Then programmatically fudge the Browser version using
> >>> capability.setVersion("9999")
>
> >>> because my hub would have Non Proxy IE browsers hooked on to it and Proxy
> >>> Enabled IE browsers. Based on the user's need they would be routed to the
> >>> appropriate browser flavors in the remote execution environment.
>
> >>> Thanks & Regards
> >>> Krishnan Mahadevan
>
> >>> "All the desirable things in life are either illegal, expensive,
> >>> fattening or in love with someone else!"
>
> >>> On Tue, Jul 12, 2011 at 8:32 PM, Derek Ekins <
de...@spathi.com> wrote:
>
> >>>> Hi Krishnan,
>
> >>>> I've not looked into the code for this (recently anyway) but this error
> >>>> stands out for me:
> >>>> *
> >>>> Proxy autodetect is incompatible with manual settings
> >>>> *
>
> >>>> You are not setting it to be both autodetect and providing manual
> >>>> settings are you? Because that sounds like a nono.
>
> >>>> On 12 July 2011 02:51, Krishnan Mahadevan <
> >>>>
krishnan.mahadevan1...@gmail.com> wrote:
>
> >>>>> Any pointers on this one folks ? I am like really stuck and can sure
> >>>>> use some help.
>
> >>>>> I am basically looking for help on how to go about using
> >>>>> RemoteWebDriver and do Proxy Server configurations.
>
> >>>>> PS: I know this works fine with the local webdrivers for all browsers,
> >>>>> but I need to be able to use RemoteWebDriver only.
>
> >>>>> Thanks & Regards
> >>>>> Krishnan Mahadevan
>
> >>>>> "All the desirable things in life are either illegal, expensive,
> >>>>> fattening or in love with someone else!"
>
> >>>>> On Mon, Jul 11, 2011 at 3:48 PM, Krishnan Mahadevan <
> >>>>>
krishnan.mahadevan1...@gmail.com> wrote:
>
> >>>>>> Simon,
> >>>>>> Here are two specific scenarios: (Note : I am relying on the latest
> >>>>>> published selenium server standalone that I downloaded from
> >>>>>> selenium-server-standalone-2.0.0.jar)<
http://selenium.googlecode.com/files/selenium-server-standalone-2.0.0...>
>
> >>>>>> *PS :* I intend to use RemoteWebDriver to kick off both local as well
> >>>>>> as remote runs. In the case of a local run, I spawn the hub programmatically
> >>>>>> and in case of remote runs I point to an already running hub. So using
> >>>>>> InternetExplorerDriver is not an option for me and I would have to rely on
> >>>>>> using only the RemoteWebDriver.
>
> >>>>>> *Scenario 1*
> >>>>>> *DesiredCapabilities capability = new DesiredCapabilities();
> >>>>>> capability.setCapability(CapabilityType.PROXY, proxy);
> >>>>>> //I am using this way of setting capabilities so that I can define
> >>>>>> much more generic WebDriver nodes and not
> >>>>>> //have to provide a lot of other capabilities such as version,
> >>>>>> platform etc.
>
> >>>>>> capability.setBrowserName(DesiredCapabilities.internetExplorer().getBrowserName());
> >>>>>> InternetExplorerDriver d = new InternetExplorerDriver(capability);
> >>>>>> *
> >>>>>> On using the above format, I dont run into errors, but I dont seem to
> >>>>>> be hitting the proxy server either (Not sure what is going on there)
>
> >>>>>> But when I use the following variant, I consistently hit errors.
> >>>>>> *Scenario 2*
> >>>>>> *DesiredCapabilities capability = new DesiredCapabilities();
> >>>>>> capability.setCapability(CapabilityType.PROXY, proxy);
> >>>>>> **//I am using this way of setting capabilities so that I can define
> >>>>>> much more generic WebDriver nodes and not
> >>>>>> //have to provide a lot of other capabilities such as version,
> >>>>>> platform etc.*
> >>>>>> *
>
> >>>>>> capability.setBrowserName(DesiredCapabilities.internetExplorer().getBrowserName());
> >>>>>> RemoteWebDriver d = new RemoteWebDriver(new URL("
> >>>>>>
http://localhost:4444/wd/hub"), capability);
> >>>>>> *
> >>>>>> The line that is causing errors
> >>>>>> *
> ...
>
> read more »