Letractively / aost

Automatically exported from code.google.com/p/aost
Other
1 stars 0 forks source link

add Tellurium API based on jQuery in Engine 0.1.0 #278

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From Dominic:

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.

Original issue reported on code.google.com by John.Jian.Fang@gmail.com on 20 Oct 2009 at 2:39

GoogleCodeExporter commented 9 years ago
Will consider to add Tellurium API based on jQuery. We will support both and 
through
the same Java API. A new flag will be used to indicate whether a user wants to 
use
Selenium native API or Tellurium API. 

Original comment by John.Jian.Fang@gmail.com on 22 Oct 2009 at 6:05

GoogleCodeExporter commented 9 years ago

Original comment by John.Jian.Fang@gmail.com on 25 Nov 2009 at 4:33

GoogleCodeExporter commented 9 years ago
Added new Tellurium API to engine and use the following method to decide 
whether to
use the new jQuery based APIs.       

 useTelluriumApi(boolean isUse)

Original comment by John.Jian.Fang@gmail.com on 30 Nov 2009 at 5:12