I implemented in the second way, i.e.,

1) Add one extra parameter in TelluriumConfig.groovy

    connector{

       //browser options such as
        //    options = "captureNetworkTraffic=true,
addCustomRequestHeader=true"
        options = ""
    }

2) Add one more signature to custom config, i.e.,

    public static void setCustomConfig(boolean runInternally, int port,
String browser,
                                       boolean useMultiWindows, String
profileLocation, String serverHost, String browserOptions){
        customConfig = new CustomConfig(runInternally, port, browser,
useMultiWindows, profileLocation, serverHost, browserOptions);
    }

3) Remove Selenium Grid tool dependency

Now, you can pass different browser options to Tellurium. Please check out
the new core jar from our Maven repo.
Also, update the TelluriumConfig.groovy, which can be found at

http://code.google.com/p/aost/wiki/TelluriumConfig070

Also, Dominicm, do you mind providing us an example that uses both the
captureNetworkTraffic and addCustomRequestHeader
features? We like to add that to our user guide. You can use the Google
Search module if you like. I simply don't have time to
create one.

Thanks,

Jian

On Wed, Aug 12, 2009 at 3:14 PM, Jian Fang <[email protected]> wrote:

> It proved to be more difficult than what I first thought. The reason is
> that we are using Selenium Grid tool, which
> controls and starts new Selenium session in a thread local variable. The
> bad thing is that it starts the Selenium session
> without any additional parameters, the code snippet is as follows,
>
>     public static void startSeleniumSession(String seleniumHost, int
> seleniumPort, String browser, String webSite) {
>         LOGGER.info("Contacting Selenium RC at " + seleniumHost + ":" +
> seleniumPort);
>         threadLocalSelenium.set(new DefaultSelenium(seleniumHost,
> seleniumPort, browser, webSite));
>         session().start();
>         LOGGER.info("Got Selenese session:" + session());
>     }
>
> We can either customize this grid tool class or merge this function
> directly to Tellurium core. The later one might be
> a better choice.
>
> Thanks,
>
> Jian
>
>
> On Mon, Aug 10, 2009 at 12:31 PM, Jian Fang <[email protected]>wrote:
>
>> Thanks, seems I can add the extra commands to the embedded server. Will
>> let you know
>> once I am done.
>>
>> -Jian
>>
>>
>> On Mon, Aug 10, 2009 at 12:21 PM, dominicm <[email protected]>wrote:
>>
>>>
>>> Hi Jian,
>>>
>>> To start from Selenium directly the mothods would use:
>>>
>>> sel.start("addCustomRequestHeader=true");
>>>
>>> or
>>>
>>> sel.start("captureNetworkTraffic=true");
>>>
>>> to use separately, or:
>>>
>>> sel.start("captureNetworkTraffic=true, addCustomRequestHeader=true");
>>>
>>> to use both options.
>>>
>>> Having played around with these methods they seem quite decent
>>> although they only work in Firefox.
>>>
>>> Thanks
>>>
>>> On Aug 6, 6:19 am, John <[email protected]> wrote:
>>> > Dominicm,
>>> >
>>> > Sorry for the delay, I just came back from my vacation.
>>> >
>>> > I have added the two following methods into DslContext:
>>> >
>>> > String captureNetworkTraffic(String type);
>>> > void addCustomRequestHeader(String key, String value);
>>> >
>>> > I guess you need more, for example,  you need
>>> > "addCustomRequestHeader=true" to
>>> > start the browser, right?
>>> >
>>> > I haven't used this feature before, how do you use it assuming you use
>>> > Selenium directly?
>>> >
>>> > Thanks,
>>> >
>>> > Jian
>>> >
>>> > On Jul 27, 2:02 pm, Jian Fang <[email protected]> wrote:
>>> >
>>> >
>>> >
>>> > > I created an issue for this.
>>> >
>>> > >http://code.google.com/p/aost/issues/detail?id=237
>>> >
>>> > > I will be out of town for a week. Probably implement this after I
>>> come back
>>> > > unless some team member
>>> > > takes over this task.
>>> >
>>> > > Thanks,
>>> >
>>> > > Jian
>>> >
>>> > > On Mon, Jul 27, 2009 at 12:01 PM, dominicm <
>>> [email protected]>wrote:
>>> >
>>> > > > Hi,
>>> >
>>> > > > I'm trying to set up some IP spoofing tests and need to use the
>>> > > > "addCustomRequestHeader" command. I can do this via
>>> customDirectCall
>>> > > > but I cannot start the browser with the required parameter
>>> > > > "addCustomRequestHeader=true" required for this to work.
>>> >
>>> > > > To add this kind of variable would also be useful for the new
>>> > > > "captureNetworkTraffic" functionality.
>>> >
>>> > > > Thanks- Hide quoted text -
>>> >
>>> > - Show quoted text -
>>> >>>
>>>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tellurium-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to