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
-~----------~----~----~----~------~----~------~--~---