Wow the code is much clearer!

I've played around a little with the jQuery click method but it
doesn't work on some elements - specifically for me links within a
list.

A full jQuery based API will be well worth doing - it could speed up
test execution greatly. If I get the time I'll try to test the jQuery
functions individually to help out.


On Oct 20, 7:47 pm, Jian Fang <[email protected]> wrote:
> BTW, you can see how clear the code is by using jQuery comparing with
> Selenium's implementation. But be aware, the code is not finished yet, for
> example, I haven't considered the key combination yet.
>
>
>
> On Tue, Oct 20, 2009 at 2:39 PM, Jian Fang <[email protected]> wrote:
> > I remember I re-implemented most Selenium API using jQuery in the 0.7.0
> > prototype branch. For example, see the following js file,
>
> >http://code.google.com/p/aost/source/browse/branches/tellurium-0.7.0-...
>
> > However, the code has not been merged into trunk yet because more work need
> > to be done there.
>
> > Thanks,
>
> > Jian
>
> > On Tue, Oct 20, 2009 at 2:15 PM, dominicm <[email protected]>wrote:
>
> >> There's a small error in the code above
>
> >>  if(ret.toString().equals("true"))
>
> >> should read
>
> >>  if(ret.toString().endsWith("true"))
>
> >> I'm sure there's a better way...
>
> >> On Oct 20, 3:37 pm, Jian Fang <[email protected]> wrote:
> >> > Cool. Thanks Dominic. We will add your code into our Engine and core
> >> > sometime later.
>
> >> > Thanks,
>
> >> > Jian
>
> >> > On Tue, Oct 20, 2009 at 10:31 AM, dominicm <[email protected]
> >> >wrote:
>
> >> > > Hi all,
>
> >> > > I'm using isVisible() quite a lot on our site (useful for Ajax
> >> > > completion for us). It is quite slow in IE so I looked at writing an
> >> > > extension to use jQuery's "visible" locator. This is working well for
> >> > > me.
>
> >> > > In user-extensions.js I have:
>
> >> > > Selenium.prototype.isVisibleJQ = function(locator){
> >> > >        return teJQuery(selenium.browserbot.findElement(locator)).is
> >> > > (":visible");
> >> > > }
>
> >> > > In my custom groovy file I have
>
> >> > > public class CustomMethods extends CustomCommand{
>
> >> > >        public Boolean isVisibleJQ(locator){
> >> > >                Object ret = commandProcessor.doCommand("isVisibleJQ",
> >> > > locator)
> >> > >                                //This is needed as a simple cast does
> >> > > not work
> >> > >                if(ret.toString().equals("true")){
> >> > >                        return true;
> >> > >                } else {
> >> > >                        return false;
> >> > >                }
>
> >> > >        }
> >> > > }
>
> >> > > In my Java code I use it like this:
>
> >> > > Boolean isVisible = (Boolean) dslContext.customUiCall(uid,
> >> > > "isVisibleJQ", new Object[0]);
>
> >> > > This method appears to be appreciably quicker than the standard
> >> > > Selenium version. I'm not especially happy with the code but it is
> >> > > good enough for a proof of concept I suppose.- Hide quoted text -
>
> >> > - Show quoted text -- 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