There are other options there, either start the selenium server using
command like

java -jar selenium-rc.jar -userExtensions user-extension.js

or we can use some code similar to

seleniumServer = new SeleniumServer(4444, false, true);
seleniumServer.start();
seleniumServer.addNewStaticContent(new File("/you_path/user-
extensions.js"));

We may like to update Tellurium to add the path for user-
extensions.js.

If you really need the user-extensions.js inside selenium-server.jar,
I can
add that to the ant build script for you later. But I like to separate
the user-extensions.js
out from selenium-server.jar.

I will check out your code tonight and see if I can add the user-
extensions.js path
for you.

Thanks,

Jian

On Dec 4, 2:23 pm, Mikhail Koryak <[EMAIL PROTECTED]> wrote:
> it might be good, if someone who is good at ant, would write an ant
> script that will take user-extensions.js and shove it into selenium-
> server.jar, since i will need to work with adding new scripts to user-
> extensions.js and right now its a somewhat manual process
>
> On Dec 4, 10:55 am, [EMAIL PROTECTED] wrote:
>
> > The locator language may be hidden from users and they do not really
> > need to know
> > about the language. What they really see will be the methods defined
> > in the DslContext
> > class. The locator language may only be used internally.
>
> > Anyway, please commit your code and add some tests or examples, then
> > we can discuss
> > further.
>
> > Thanks,
>
> > Jian
>
> > On Dec 4, 10:44 am, Mikhail Koryak <[EMAIL PROTECTED]> wrote:
>
> > > Re: locator language
> > > It sounds like an interesting idea, but you will need to sell it to
> > > better. what can it do that jquery selectors cannot do? with plain
> > > jquery selectors you can accomplish a lot, and a LOT of poeple already
> > > know jquery, which in turn will make it easier for them to get started
> > > with tellurium.
>
> > > On Dec 4, 10:34 am, [EMAIL PROTECTED] wrote:
>
> > > > I am very glad to hear that. We need to create the Engine project.
>
> > > > Matt, do you have time to create a new Engine project in the trunk and
> > > > update the pom files?
>
> > > > Thanks,
>
> > > > Jian
>
> > > > On Dec 4, 10:30 am, Mikhail Koryak <[EMAIL PROTECTED]> wrote:
>
> > > > > yes, i think its doable, i think we are talking about the same thing
> > > > > actually. ill try to commit my code soon.
>
> > > > > On Dec 4, 10:22 am, [EMAIL PROTECTED] wrote:
>
> > > > > > Mikhail,
>
> > > > > > Please commit your code to
> > > > > >  https://aost.googlecode.com/svn/branches/core-jlocator
> > > > > > so that I and other team members can take a look.
>
> > > > > > To be able to support multiple elements, we may have to modify the
> > > > > > selenium
> > > > > > core or we should start our own Engine project earlier so that we 
> > > > > > will
> > > > > > not
> > > > > > be constrained by Selenium implementation. Would it be possible for 
> > > > > > us
> > > > > > to start
> > > > > > the Engine project in an agile way, that is to say, for most regular
> > > > > > calls from
> > > > > > Tellurium to Selenium, we still use Selenium core. But for your 
> > > > > > jquery
> > > > > > selectors
> > > > > > and multiple element support, we start to write a small engine that
> > > > > > only includes the
> > > > > > extra methods you provide. How much effort if we do in this way and 
> > > > > > is
> > > > > > it doable?
>
> > > > > > Thanks,
>
> > > > > > Jian
>
> > > > > > On Dec 4, 9:50 am, Mikhail Koryak <[EMAIL PROTECTED]> wrote:
>
> > > > > > > I have been giving this more thought, let me know what you think 
> > > > > > > about
> > > > > > > this:
>
> > > > > > > group locators should get the extra methods that i provide, 
> > > > > > > because by
> > > > > > > definition they group a set of elements. right now, they are used 
> > > > > > > to
> > > > > > > more precisely locate their enclosing elements, right? we can add
> > > > > > > these extra methods to them and let these methods act on all 
> > > > > > > elements
> > > > > > > that the locator groups. also, we can provide an optional 
> > > > > > > argument to
> > > > > > > the methods called 'filter' which will filter the grouped set.
>
> > > > > > > On Dec 3, 11:09 pm, Mikhail Koryak <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > its possible to dynamically create jquery selectors, but since 
> > > > > > > > all
> > > > > > > > current locators will select a single element, the generated 
> > > > > > > > jquery
> > > > > > > > selectors will also locate a single element. since jquery 
> > > > > > > > selectors
> > > > > > > > and xpath locators at the end do the same thing - select some
> > > > > > > > elements.
>
> > > > > > > > most of the time, i will use a clocator that looks like this
> > > > > > > > [id:"someid", name:"somename"] - it has to locate a single 
> > > > > > > > element, or
> > > > > > > > none of the selenium methods will work correctly, right? ive 
> > > > > > > > never
> > > > > > > > tried to make a clocator that will use a class name only. what 
> > > > > > > > is the
> > > > > > > > outcome of that? i dont think it will work.
>
> > > > > > > > that is the problem, we cannot dynamically make a locator that 
> > > > > > > > locates
> > > > > > > > a single element, locate mulitples... unless.. we can use a 
> > > > > > > > group
> > > > > > > > locator, and try to act on the entire group of all elements 
> > > > > > > > under that
> > > > > > > > element.. ?
>
> > > > > > > > On Dec 3, 3:24 pm, [EMAIL PROTECTED] wrote:
>
> > > > > > > > > You have very good point here. Is it possible for you to 
> > > > > > > > > dynamically
> > > > > > > > > create
> > > > > > > > > the JQuery selectors based on a set of criteria/attributes 
> > > > > > > > > passed in?
> > > > > > > > > Then
> > > > > > > > > you may not have the limit of one locator maps to one element 
> > > > > > > > > by
> > > > > > > > > treating
> > > > > > > > > the set of criteria/attributes as a special locator. That is 
> > > > > > > > > to say,
> > > > > > > > > we only
> > > > > > > > > pass in a special locator and under the hood, you will 
> > > > > > > > > generate
> > > > > > > > > multiple
> > > > > > > > > ones at the js level. Let me know if I understand the question
> > > > > > > > > correctly or not.
>
> > > > > > > > > I agree, we may only need to return multiple objects on your 
> > > > > > > > > new
> > > > > > > > > methods.
>
> > > > > > > > > On Dec 3, 2:27 pm, Mikhail Koryak <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > I think you may have misunderstood. I am not talking about 
> > > > > > > > > > anything at
> > > > > > > > > > the java level when i say a locator cannot return multiple 
> > > > > > > > > > elements.
> > > > > > > > > > at the selenium js level, a locator can only return 1 
> > > > > > > > > > element, except
> > > > > > > > > > for the table locator, but that is a special case, and uses 
> > > > > > > > > > a subset
> > > > > > > > > > of selenium-core methods not used by the rest of the 
> > > > > > > > > > locators.
> > > > > > > > > > so, let us agree that any locator must return a single 
> > > > > > > > > > element, unless
> > > > > > > > > > we heavily modify selenium-core (i think it will take a 
> > > > > > > > > > rewrite).
>
> > > > > > > > > > so, currently all tellurium locators return a single 
> > > > > > > > > > element.
> > > > > > > > > > my new methods work best if you pass in a jquery selector 
> > > > > > > > > > that will
> > > > > > > > > > select multiple elements. Under the hood, i added a new 
> > > > > > > > > > location
> > > > > > > > > > strategy, ie a new locator which actually returns multiple 
> > > > > > > > > > elements,
> > > > > > > > > > but it is only used by my user-extension methods, so it 
> > > > > > > > > > does not break
> > > > > > > > > > anything.
>
> > > > > > > > > > so, it looks to me that we cannot add my new methods to any 
> > > > > > > > > > UiObjects
> > > > > > > > > > because every UiObject provides a locator, as you mentioned 
> > > > > > > > > > above, and
> > > > > > > > > > these locators can only return a single element.
> > > > > > > > > > Ofcourse, my new methods can remain as methods of 
> > > > > > > > > > DslContext, and
> > > > > > > > > > maybe that is the right thing to do for now.
>
> > > > > > > > > > to illustrate what i mean, here is the user-extension for 
> > > > > > > > > > one of the
> > > > > > > > > > methods:
>
> > > > > > > > > > Selenium.prototype.getSelectorText = function(jq){
> > > > > > > > > >         var e = 
> > > > > > > > > > this.browserbot.findElement("jqueryall="+jq); //use a custom
> > > > > > > > > > locator that returns a jquery wrapped set given a jquery 
> > > > > > > > > > selector
> > > > > > > > > >         var out = [];
> > > > > > > > > >         for(var i = 0; i < e.length; i++){ //iterate over 
> > > > > > > > > > the entire wrapped
> > > > > > > > > > set, and collect information into an array
> > > > > > > > > >                 out.push($(e[i]).text()); //using jquery
> > > > > > > > > >         }
> > > > > > > > > >         return JSON.stringify(out); //stringify the list 
> > > > > > > > > > and return to client
> > > > > > > > > > where it will be parsed back into a list
>
> > > > > > > > > > };
>
> > > > > > > > > > i see a lot of power in being able to craft a jquery 
> > > > > > > > > > selector that
> > > > > > > > > > selects multiple elements, and gathering information from 
> > > > > > > > > > ALL of them
> > > > > > > > > > in one call.
>
> > > > > > > > > > On Dec 3, 1:20 pm, [EMAIL PROTECTED] wrote:
>
> > > > > > > > > > > The UiObject contains one locator, which could be 
> > > > > > > > > > > BaseLocator,
> > > > > > > > > > > CompositeLocator,
> > > > > > > > > > > or the JQueryLocator you define. It is fine to return an 
> > > > > > > > > > > array of
> > > > > > > > > > > objects from
> > > > > > > > > > > one locator. For example, you may return an ArrayList for 
> > > > > > > > > > > a table row
> > > > > > > > > > > and you
> > > > > > > > > > > still use the table's locator and pass in the row number 
> > > > > > > > > > > as another
> > > > > > > > > > > parameter.
> > > > > > > > > > > Under the hood, either the Table or the JQuery at 
> > > > > > > > > > > selenium core will
> > > > > > > > > > > handle how
> > > > > > > > > > > to select multiple UI elements. As a result, the multiple 
> > > > > > > > > > > UI elements
> > > > > > > > > > > would not
> > > > > > > > > > > be exposed to the DslContext layer, i.e., users.
>
> > > > > > > > > > > I do not know if I understand your questions correctly or 
> > > > > > > > > > > not. Could
> > > > > > > > > > > you give some examples here
> > > > > > > > > > > for us to discuss further?
>
> > > > > > > > > > > Thanks,
>
> > > > > > > > > > > Jian
>
> > > > > > > > > > > On Dec 3, 11:56 am, Mikhail Koryak <[EMAIL PROTECTED]> 
> > > > > > > > > > > wrote:
>
> > > > > > > > > > > > Ive extended DslContext to support the following calls:
>
> > > > > > > > > > > > def ArrayList getSelectorProperties(String jqSelector, 
> > > > > > > > > > > > List<String>
> > > > > > > > > > > > props)
> > > > > > > > > > > > def ArrayList getSelectorText(String jqSelector)
> > > > > > > > > > > > def Object getSelectorFunctionCall(String jqSelector, 
> > > > > > > > > > > > String fn)
>
> > > > > > > > > > > > the first function takes a jquery selector, and a list 
> > > > > > > > > > > > of DOM
> > > > > > > > > > > > properties to gather, and returns an array list of 
> > > > > > > > > > > > hashmaps containing
> > > > > > > > > > > > a mapping of the given propeties to their values in the 
> > > > > > > > > > > > DOM elements
> > > > > > > > > > > > selected by the given jquery
>
> > > > > > > > > > > > the second function returns an array list of strings 
> > > > > > > > > > > > where each string
> > > > > > > > > > > > is the text of each element selected by the jquery
>
> > > > > > > > > > > > the last function is a
>
> ...
>
> read more ยป
--~--~---------~--~----~------------~-------~--~----~
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