Ok, since the click() method in Tellurium API needs more work. I delegate
click()
to selenium directly for the timebeing by commenting out the following line
in tellurium.js.

//    this.registerApi("click", true, "VOID");

Please feel free to uncomment this line and try to fix it.

Thanks in advance,

Jian

On Tue, Apr 13, 2010 at 12:28 AM, Jian Fang <[email protected]>wrote:

> I re-run my core test cases, seems your code does not work for direct URL
> such as
>
> <a href="http://code.google.com/p/aost";>Tellurium</a>
>
> I can see that is because you didn't have
>
> selenium.browserbot.currentWindow.location = teJQuery(this).attr('href');
>
> or
>
> selenium.browserbot.currentWindow.location = teJQuery(this).attr('url');
>
> Here comes the question: when do we need the above location change?  Or in
> other words,
> what differentiates a page opening on the same window and a popup window?
>
> Could you post the click UI html snippet for the popup window in your test
> case?
>
> Thanks,
>
> Jian
>
>
> On Mon, Apr 12, 2010 at 11:56 PM, Jian Fang <[email protected]>wrote:
>
>> Hi Dominic,
>>
>> I have added your code into Tellurium Engine. Could you please update your
>> 0.7.0 snapshot and test if the new artifacts work fine for you?
>>
>> Thanks in advance,
>>
>> Jian
>>
>>
>> On Mon, Mar 22, 2010 at 2:33 PM, dominicm <[email protected]>wrote:
>>
>>> Hi Jian,
>>>
>>> I've had some time to look into these issues some more.
>>>
>>> The good news
>>> Issue 402 - isVisible - This now works for me if I add an extra check
>>> for element.css("visibility"). I've updated the issue with a working
>>> example
>>>
>>>
>>> The not so good news
>>> Issues 403 and 404, plus other issues I've found with mouseOver,
>>> mouseOut and several other event related functions seem to stem from a
>>> problem with using the jQuery event APIs. Basically I don't think many
>>> of them work unless the event handlers have been defined using jQuery
>>> itself.
>>>
>>>
>>> Having said that I did find a way of getting both methods working,
>>> though I think this may be a bit of a re-invention of the selenium
>>> APIs for the most part.
>>>
>>> For 403 I played around and found a way of triggering the event
>>> handlers using logic like the following:
>>>
>>> Selenium.prototype.doSelectByValueAlt = function(locator, value) {
>>>        var element = selenium.browserbot.findElement(locator);
>>>        teJQuery(element).val(value);
>>>        if( teJQuery.browser.msie){
>>>                element.fireEvent("onchange");
>>>        } else {
>>>                var evObj = document.createEvent('HTMLEvents');
>>>                evObj.initEvent( 'change', true, true );
>>>                element.dispatchEvent(evObj);
>>>        }
>>> }
>>>
>>> For 404 using similar code works with links and popups just fine and
>>> seems works better than the default selenium click for googlechrome
>>> and safari.
>>>
>>> Selenium.prototype.doClickJQ = function(locator) {
>>>        var element = selenium.browserbot.findElement(locator);
>>>        if(element.href || element.url){
>>>                if( teJQuery.browser.msie){
>>>                        element.fireEvent("onclick");
>>>                } else {
>>>                        //teJQuery(element).val(option)
>>>                        var evObj = document.createEvent('HTMLEvents');
>>>                        evObj.initEvent( 'click', true, true );
>>>                        element.dispatchEvent(evObj);
>>>                }
>>>        } else {
>>>                teJQuery(element).click();
>>>         }
>>> }
>>>
>>>
>>>
>>>
>>>
>>> On Mar 9, 2:31 pm, John <[email protected]> wrote:
>>> > The following issues are created for tracking purpose.
>>> >
>>> >
>>> http://code.google.com/p/aost/issues/detail?id=402http://code.google.com/p/aost/issues/detail?id=403http://code.google.com/p/aost/issues/detail?id=404
>>> >
>>> > Thanks,
>>> >
>>> > Jian
>>> >
>>> > On Mar 7, 4:39 pm, Jian Fang <[email protected]> wrote:
>>> >
>>> >
>>> >
>>> > > Dominic,
>>> >
>>> > > We really appreciate your feedback and will create couple issues to
>>> track
>>> > > the problems
>>> > > listed in your email.
>>> >
>>> > > Thanks,
>>> >
>>> > > Jian
>>> >
>>> > > On Sun, Mar 7, 2010 at 8:07 AM, dominicm <[email protected]>
>>> wrote:
>>> > > > Hi,
>>> >
>>> > > > I've started using the new APIs and have come across a few issues.
>>> >
>>> > > > 1. isVisible does not return the correct value at all times.
>>> > > > I think the function will need additional checks, maybe like:
>>> >
>>> > > >
>>> teJQuery(selenium.browserbot.findElement("jquery=#totalFunds")).css('visibi­lity')
>>> >
>>> > > > 2. selectByValue, selectByLabel etc. do not seem to trigger
>>> JavaScript
>>> > > > events
>>> > > > During my tests the field contents are modified but pages do not
>>> > > > reload when I expect them to.
>>> > > > I noticed the selenium API has this at the end of the code
>>> > > > if (changed) { triggerEvent(element, 'change', true); }
>>> > > > I tried doing a similar thing with jQuery but could not make it
>>> work.
>>> >
>>> > > > 3. click does not work correctly when a link should open a popup
>>> > > > window. Instead it opens the location of the popup in the main
>>> window.
>>> > > > Maybe some extra logic to take account of the "target" attribute is
>>> > > > needed?
>>> >
>>> > > > Thanks
>>> >
>>> > > > --
>>> > > > 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]<tellurium-users%[email protected]>
>>> <tellurium-users%2bunsubscr...@­googlegroups.com>
>>> > > > .
>>> > > > For more options, visit this group at
>>> > > >http://groups.google.com/group/tellurium-users?hl=en.- 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]<tellurium-users%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/tellurium-users?hl=en.
>>>
>>>
>>
>

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