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

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