What are the advantages of the ExtJs Javascript object over jQuery selector?
jQuery can also do the similar thing
jQuery("mainWindow").isVisible()
I am not familiar with ExtJs, but I would rather extend Tellurium to handle
the
runtime matching. Most likely, this would be on the Engine side. Of course,
we can provide a hook for you to plugin some ExtJs specific functions there.
The difference between a single UI element, which is the case for Selenium,
and
UI module in Tellurium is that a matching for a single UI element could be
either
found or not found, but for the UI module (widget, of course), you could
have like
80% match (because you have multiple elements inside the UI module) and it
still
is valid if we know that there is only one such widget on the web.
If you really want to access Javascript objects, you have to add custom
Selenium
methods without the Engine support. Please take tellurium-extension.js in
our
Engine project as an example.
Thanks,
Jian
On Fri, May 15, 2009 at 6:14 PM, Nicolae Vintila <[email protected]> wrote:
> Runtime matching : if I wanted to introduce this where should I put it?
>
> I figured that instead of reverse engineering the css to express things
> like isVisible I could access EXT-JS itself to retrieve the JS object for
> the UI component!
>
> (JavaScript)
> Ext.getCmp("mainWindow").isVisible() plus .hide(), .show(), etc.
>
> So I am thinking to have ExtJsWidget contain the EXT-JS javascript object.
> Maybe even use GWT-EXT because it is in Java....
>
> Thoughts?
>
> Nick
>
>
>
> On Fri, May 15, 2009 at 3:23 PM, Jian Fang <[email protected]>wrote:
>
>> You are welcome.
>>
>> You have good point about the Runtime matching instead of relying on
>> static types, which is also a strong motivation
>> for us to move some of the logic to the Engine side so that the Engine
>> could do runtime matching and detecting directly
>> instead of the round trip from core to Engine.
>>
>> I also suggest you first implement couple smaller and less complicated
>> widgets to get familiar with Tellurium widget and
>> get to know its shortcomings and possible ways to improve it.
>>
>> I am not sure I could work on the widget soon, but definitely will go back
>> to refactor it later.
>>
>> Thanks,
>>
>> Jian
>>
>>
>> On Fri, May 15, 2009 at 3:09 PM, Nicolae Vintila <[email protected]>wrote:
>>
>>> Yes, we might need more machinery - glad you are interested. :-)
>>>
>>> I will start with what we have and bug you along the way.
>>>
>>> Will likely develop for the needs I have and go towards generality
>>> instead of trying to map the entire library.
>>>
>>> Maybe we need some way to have the widget itself participate in the
>>> pattern matching using ... "imperative" logic.
>>>
>>> Will likely also need some runtime determination about the type of
>>> components.
>>>
>>> The template assumes the concrete types of the widgets are statically
>>> determined - but at runtime there may be more specific types : Panel vs
>>> FormPanel.
>>>
>>> I am grateful for the superb support and assistance so far.
>>>
>>> Nick
>>>
>>>
>>>
>>>
>>> On Fri, May 15, 2009 at 2:59 PM, Jian Fang <[email protected]>wrote:
>>>
>>>> I see your goal here. I agree it is too complicated to express in
>>>> Tellurium UI templates. Maybe we need some other mechanisms
>>>> to handle this type of complexity. How about have another tier for the
>>>> transform? I mean
>>>>
>>>> Widget UI module
>>>>
>>>> |
>>>>
>>>> Javascript Library specific transform
>>>>
>>>> |
>>>>
>>>> Tellurium UI module
>>>>
>>>> In this way, hope the transform tier could absorb some dynamic factors
>>>> here.
>>>>
>>>> I have not worked on Widget for quite some time and maybe should
>>>> re-think about the widget architecture.
>>>> The key thing here is how to find widget in the runtime DOM and then act
>>>> on each individual element, which
>>>> is really a pattern matching problem and how to describe the Widget with
>>>> as least attributes as possible.
>>>>
>>>> Need more thoughts on this.
>>>>
>>>> Thanks,
>>>>
>>>> Jian
>>>>
>>>>
>>>>
>>>> On Fri, May 15, 2009 at 2:41 PM, Nicolae Vintila <[email protected]>wrote:
>>>>
>>>>>
>>>>> "You want to optimize the attributes in the UI module so that the UI
>>>>> module works better for XPath or jQuery
>>>>> selector, right? "
>>>>>
>>>>> I want to use an approach that makes it possible to manage the
>>>>> complexity of so many complex widgets - EXT-JS is a large library and
>>>>> encapsulates a significant complexity.
>>>>>
>>>>> Many widgets with numerous options which all influence the generated
>>>>> DOM.
>>>>>
>>>>> Does not seem possible to completely cover the combinations - even the
>>>>> rendering of a button in a form can be customized with a template... - see
>>>>> end.
>>>>>
>>>>> Cheers
>>>>> Nick
>>>>>
>>>>> From FormLayout.js
>>>>>
>>>>> if(!this.fieldTpl){
>>>>> var t = new Ext.Template(
>>>>> '<div class="x-form-item {5}" tabIndex="-1">',
>>>>> '<label for="{0}" style="{2}"
>>>>> class="x-form-item-label">{1}{4}</label>',
>>>>> '<div class="x-form-element" id="x-form-el-{0}"
>>>>> style="{3}">',
>>>>> '</div><div class="{6}"></div>',
>>>>> '</div>'
>>>>> );
>>>>> t.disableFormats = true;
>>>>> t.compile();
>>>>> Ext.layout.FormLayout.prototype.fieldTpl = t;
>>>>>
>>>>>
>>>>> ----
>>>>>
>>>>> Generates
>>>>>
>>>>>
>>>>> <div class="x-form-item"
>>>>>
>>>>> tabindex="-1">
>>>>>
>>>>> <label id="ext-gen1435"
>>>>>
>>>>> for="lookupComboBox"
>>>>>
>>>>> style="width: 60px;"
>>>>>
>>>>> class="x-form-item-label">CAP
>>>>>
>>>>> code:</label>
>>>>>
>>>>>
>>>>> <div class="x-form-element"
>>>>>
>>>>> id="x-form-el-DayTimeEntryForm_capCode_lookupComboBox"
>>>>>
>>>>> style="padding-left: 65px;">
>>>>>
>>>>> <div style="width: 0px;"
>>>>>
>>>>> id="ext-gen1154"
>>>>>
>>>>> class="x-form-field-wrap">
>>>>>
>>>>> <input style="width: 300px;"
>>>>>
>>>>> class="x-form-text x-form-field"
>>>>>
>>>>> size="24"
>>>>>
>>>>> autocomplete="off"
>>>>>
>>>>> id="lookupComboBox"
>>>>>
>>>>> name="codeLookup"
>>>>>
>>>>> type="text"><img
>>>>>
>>>>> style="display: none;"
>>>>>
>>>>> id="ext-gen1155"
>>>>>
>>>>> src="
>>>>> http://localhost:8080/webtime/com.mercer.apps.webtime.webtime_web/clear.cache.gif
>>>>> "
>>>>>
>>>>> class="x-form-trigger x-form-arrow-trigger">
>>>>>
>>>>> </div>
>>>>>
>>>>> </div>
>>>>>
>>>>> <div class="x-form-clear-left"></div>
>>>>>
>>>>> </div>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---