tellurium user extension

2 views
Skip to first unread message

Mikhail Koryak

unread,
Jan 21, 2009, 3:44:58 PM1/21/09
to tellurium-users
How hard would it be to use groovy to make tellurium be user-
extendable. what i mean, is selenium has CustomSelenium where you can
add some functions and as long as you have them in the user-extensions
you can call custom functions.

With tellurium this is not as easy because you have to go through the
accessor or the dispatcher and modify multiple files to make a simple
change. Can we use the power of groovy to make this easier?

so if a method is not found, and it returns a value, call the
dispatcher with the method, and if it returns a void, call the
accessor, or something like that? What are your thoughts?

John.Ji...@gmail.com

unread,
Jan 21, 2009, 4:27:28 PM1/21/09
to tellurium-users
It wouldn't be difficult to use Groovy meta programming to forward
the
missing method to the Dispatcher class, or we can create a custom
class for
this purpose.

The difficult part would still be Selenium RC part. If I remember
correctly,
it needs to convert the method into pipe format command. For custom
methods,
do you have a generic way to do the conversion?

Thanks,

Jian

Mikhail Koryak

unread,
Jan 21, 2009, 4:30:49 PM1/21/09
to tellurium-users
it does not need to convert into pipe format.
for example take a look at one of my custom jquery methods:

def String getSelectorText(String jqSelector){
String[] arr = [jqSelector];
String st = commandProcessor.doCommand("getSelectorText", arr);
return st;
}

so you need to pass in the method name, and an array of arguments to
the method, and it returns a string.

John.Ji...@gmail.com

unread,
Jan 21, 2009, 4:57:12 PM1/21/09
to tellurium-users
Cool, seems Selenium RC does the format conversion automatically.

For Groovy meta programming, you can use methodMissing or interceptor.
I would suggest you create a new class to forward all custom methods
to
Dispatcher using same way as the Dispatcher class. The only thing is
what if you want to add extra events to the custom methods.

Let us be agile, first try to implement couple methods and then you
will see more
clearly about the implementation details.

Thanks,

Jian
Reply all
Reply to author
Forward
0 new messages