Found the problem, the UI module generated by Tellurium IDE is not unique,
you should see a red mark on the Wikipedia link. (You have to manually
modify it a bit if you see the red mark). Please try the following UI
module.

Thanks,

Jian

        ui.Container(uid: "Sftab", clocator: [tag: "table", id: "sftab"]){
                InputBox(uid: "Q", clocator: [tag: "input", type: "text",
title: "Search", name: "q", class: "lst"])
                SubmitButton(uid: "Search", clocator: [tag: "input", type:
"submit", value: "Search", class: "lsb", name: "btnG"])
                Container(uid: "Section", clocator: [tag: "tr"]){
                    Container(uid: "Part", clocator: [tag: "td", direct:
"true"]){
                        Container(uid: "Table", clocator: [tag: "table"]){
                            Container(uid: "Section", clocator: [tag:
"tr"]){
                                Container(uid: "Lstxbtn", clocator: [tag:
"td", direct: "true", class: "lst-td lst-td-xbtn", id: "lst-xbtn"]){
                                    InputBox(uid: "Grey", clocator: [tag:
"input", type: "text", id: "grey", class: "lst"])
                                }
                                Container(uid: "LsttdLsttdxbtn", clocator:
[tag: "td", direct: "true", class: "lst-td lst-td-xbtn"]){
                                    UrlLink(uid: "Xbtn", clocator: [tag:
"a", text: "×", direct: "true", title: "Clear search", id: "xbtn"])
                                }
                            }
                        }
                    }
                }
            }

        ui.Container(uid: "Vsc", clocator: [tag: "div", class: "vsc"]){
                UrlLink(uid: "Wikipedia", clocator: [tag: "a", class: "l",
href: "http://en.wikipedia.org/wiki/Agile_testing";], respond: ["mouseDown"])
            }

        open "http://www.google.com/";
        type "Sftab.Q", "agile testing methodology"
        click "Sftab.Search"

        click "Vsc.Wikipedia"
        waitForPageToLoad 30000

On Mon, Jan 24, 2011 at 11:21 AM, Rob <[email protected]> wrote:

> I'm using Tellurium IDE 0.8.0 and recorded my first very simple test
> (code below).  Then I ran it (output below).  The problem is I ended
> up in the wrong place.  From the google results page, instead of going
> to wikipedia, I went to a microsoft page (which was second in the
> listings, wikipedia was third).  Is this a bug, or did I do something
> wrong?  In either case, a pointer to how to fix it would be
> appreciated.  Thanks.
>
> Rob
>
>
> ui.Container(uid: "Div", clocator: [tag: "div"]){
>        InputBox(uid: "Q", clocator: [tag: "input", direct: "true", type:
> "text", title: "Search", name: "q", class: "lst"])
> }
>
> ui.Container(uid: "Wikipedia", clocator: [tag: "a", text: "-
> Wikipedia, the free encyclopedia", class: "l"], respond: ["mouseDown"])
> {
>        TextBox(uid: "AgileTesting", clocator: [tag: "em", text: "Agile
> testing", direct: "true"])
> }
>
> ui.Container(uid: "Li", clocator: [tag: "li"]){
>        UrlLink(uid: "ExternalText", clocator: [tag: "a", class: "external
> text"])
> }
>
>                open "http://www.google.com/";
>                type "Div.Q", "agile testing methodology"
>
>                click "Wikipedia.AgileTesting"
>                waitForPageToLoad 30000
>
>                click "Li.ExternalText"
>                waitForPageToLoad 30000
>
>
>    * [info] Running tests...
>    * [debug] Running test [name: open, uid: null, value:
> http://www.google.com/]
>    * [debug] Run command open, cmd name: open, type: noUid,
> returnType: void, handler: function (url) { if (url ==
> this.browserBot.getCurrentUrl()) { this.onPageLoad(); } else
> { this.browserBot.showInBrowser(url); var self = this;
> this.browserBot.newPageLoaded = false; this.browserBot.pageLoadError =
> null; this.browserBot.pageTimeoutTimerId = null;
> setTimeout(WaitPageLoad, 1000, self); } this.clearCache(); }, , args
> 0: http://www.google.com/,
>    * [debug] Running test [name: type, uid: Div.Q, value: agile
> testing methodology]
>    * [debug] Run command type, cmd name: type, type: hasUid,
> returnType: void, handler: function (uid, val)
> { this.execCommand("type", uid, val); }, , args 0: Div.Q, 1: agile
> testing methodology,
>    * [debug] Running test [name: click, uid: Wikipedia.AgileTesting,
> value: null]
>    * [debug] $relaxed size: 1
>    * [debug] $relaxed size: 1
>    * [debug] Run command click, cmd name: click, type: hasUid,
> returnType: void, handler: function (uid) { this.execCommand("click",
> uid); }, , args 0: Wikipedia.AgileTesting, 1: null,
>    * [debug] Update current DOM for tellurium command executor after
> page loaded.
>    * [debug] Update current DOM for tellurium command executor after
> page loaded.
>    * [debug] Running test [name: waitForPageToLoad, uid: null, value:
> 30000]
>    * [debug] Run command waitForPageToLoad, cmd name:
> waitForPageToLoad, type: noUid, returnType: void, handler: function
> (timeout) { var self = this; logger.debug("Set up page load timeout
> timer at " + (new Date).getTime() + ": timeout=" + timeout);
> this.browserBot.pageTimeoutTimerId = setTimeout(function ()
> {logger.debug("Page load timeout at " + (new
> Date).getTime());self.browserBot.newPageLoaded =
> false;self.browserBot.pageLoadError =
> PageLoadError.TIMEOUT;self.browserBot.pageTimeoutTimerId = null;if
> (self.browserBot.pagePollTimerId != null)
>
> {clearInterval(self.browserBot.pagePollTimerId);self.browserBot.pagePollTimerId
> = null;}}, timeout); this.browserBot.pollPageLoad();
> this.clearCache(); }, , args 0: 30000,
>    * [debug] Set up page load timeout timer at 1295884424896:
> timeout=30000
>    * [debug] Update current DOM for tellurium command executor after
> page loaded.
>    * [debug] Running test [name: click, uid: Li.ExternalText, value:
> null]
>    * [debug] $relaxed size: 1
>    * [debug] Run command click, cmd name: click, type: hasUid,
> returnType: void, handler: function (uid) { this.execCommand("click",
> uid); }, , args 0: Li.ExternalText, 1: null,
>    * [debug] Running test [name: waitForPageToLoad, uid: null, value:
> 30000]
>    * [debug] Run command waitForPageToLoad, cmd name:
> waitForPageToLoad, type: noUid, returnType: void, handler: function
> (timeout) { var self = this; logger.debug("Set up page load timeout
> timer at " + (new Date).getTime() + ": timeout=" + timeout);
> this.browserBot.pageTimeoutTimerId = setTimeout(function ()
> {logger.debug("Page load timeout at " + (new
> Date).getTime());self.browserBot.newPageLoaded =
> false;self.browserBot.pageLoadError =
> PageLoadError.TIMEOUT;self.browserBot.pageTimeoutTimerId = null;if
> (self.browserBot.pagePollTimerId != null)
>
> {clearInterval(self.browserBot.pagePollTimerId);self.browserBot.pagePollTimerId
> = null;}}, timeout); this.browserBot.pollPageLoad();
> this.clearCache(); }, , args 0: 30000,
>    * [debug] Set up page load timeout timer at 1295884427114:
> timeout=30000
>    * [debug] Update current DOM for tellurium command executor after
> page loaded.
>
> --
> 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