On Apr 25, 2:33 am, Harihara Vinayakaram <[email protected]> wrote:
> Hi
> I have added methods to access the XForm as part of the
> user-extensions.js and I am able to test them with Selenium
>
> I am faced with the following questions :
>
> 1)
> I cannot define a XForm module since the module definitions do not take a
> name space in the tag. I am not sure what is the best way of over coming
> that
Selenium uses XPath in the following way,
var results = eval_xpath(xpath, inDocument, {
ignoreAttributesWithoutValue:
this.ignoreAttributesWithoutValue,
allowNativeXpath : this.allowNativeXpath,
xpathLibrary : this.xpathLibrary,
namespaceResolver : this._namespaceResolver
});
Here the namespaceResolver is as follows
BrowserBot.prototype._namespaceResolver = function(prefix) {
if (prefix == 'html' || prefix == 'xhtml' || prefix == 'x') {
return 'http://www.w3.org/1999/xhtml';
} else if (prefix == 'mathml') {
return 'http://www.w3.org/1998/Math/MathML';
} else {
throw new Error("Unknown namespace: " + prefix + ".");
}
}
Perhaps, you have to modify the namespaceResolver to include your
namespace.
One other option is to use jQuery and seems jQuery also supports
XPath and namespace, for instance, see the following post
http://www.xml.com/pub/a/2007/10/10/jquery-and-xml.html?page=2
I have not thought of this support yet. But can consider this if you
really
want it.
> 2)
> Some of the XForm controls are not visible in the DOM (The XForm
> processor in Mozilla uses XBL bindings and these are not visible in the DOM
> ).. One example of this is the XForm Repeat tag. I am not sure how I can
> define them in the UI module
Repeat tag is used to control the rendering, right? Sounds like a good
fit for
UI templates. You can define a List and use template for the repeat
tag.
> 3)
> Some of my tests which do not use XForm specific inputs are coded as
> Tellurium modules (having init etc ) while the others need to be accessed as
> selenium . Is there a way I can mix these 2 (Not sure if that is a good idea
> . Is there somekind of get the selenium object of Tellurium )
Tellurium covers pretty much all methods in Selenium, why you need to
use
selenium directly? You can use
customDirectCall(String method, Object[] args)
to pass your call to selenium directly.
>
> Regards
> Hari
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---